variable TriggerFile can be declared as static

Started by Fujii Masaoover 15 years ago2 messages
#1Fujii Masao
masao.fujii@gmail.com
1 attachment(s)

Hi,

Currently the variable TriggerFile is declared as extern, but
it's not used in other source file than xlog.c. How about
declaring it as static? Here is the patch.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachments:

definition_triggerfile_v1.patchapplication/octet-stream; name=definition_triggerfile_v1.patchDownload
*** a/src/backend/access/transam/xlog.c
--- b/src/backend/access/transam/xlog.c
***************
*** 190,196 **** static TimestampTz recoveryLastXTime = 0;
  /* options taken from recovery.conf for XLOG streaming */
  static bool StandbyMode = false;
  static char *PrimaryConnInfo = NULL;
! char	   *TriggerFile = NULL;
  
  /* if recoveryStopsHere returns true, it saves actual stop xid/time here */
  static TransactionId recoveryStopXid;
--- 190,196 ----
  /* options taken from recovery.conf for XLOG streaming */
  static bool StandbyMode = false;
  static char *PrimaryConnInfo = NULL;
! static char *TriggerFile = NULL;
  
  /* if recoveryStopsHere returns true, it saves actual stop xid/time here */
  static TransactionId recoveryStopXid;
*** a/src/include/access/xlog.h
--- b/src/include/access/xlog.h
***************
*** 258,267 **** typedef struct CheckpointStatsData
  
  extern CheckpointStatsData CheckpointStats;
  
- /* Read from recovery.conf, in startup process */
- extern char *TriggerFile;
- 
- 
  extern XLogRecPtr XLogInsert(RmgrId rmid, uint8 info, XLogRecData *rdata);
  extern void XLogFlush(XLogRecPtr RecPtr);
  extern void XLogBackgroundFlush(void);
--- 258,263 ----
#2Heikki Linnakangas
heikki.linnakangas@enterprisedb.com
In reply to: Fujii Masao (#1)
Re: variable TriggerFile can be declared as static

On 10/06/10 10:25, Fujii Masao wrote:

Currently the variable TriggerFile is declared as extern, but
it's not used in other source file than xlog.c. How about
declaring it as static? Here is the patch.

Thanks, applied.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com