mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Refactor inCommit flag into generic delayChkpt flag.
Rename PGXACT->inCommit flag into delayChkpt flag, and generalise comments to allow use in other situations, such as the forthcoming potential use in checksum patch. Replace wait loop to look for VXIDs with delayChkpt set. No user visible changes, not behaviour changes at present. Simon Riggs, reviewed and rebased by Jeff Davis
This commit is contained in:
@@ -168,7 +168,8 @@ typedef struct PGXACT
|
||||
|
||||
uint8 vacuumFlags; /* vacuum-related flags, see above */
|
||||
bool overflowed;
|
||||
bool inCommit; /* true if within commit critical section */
|
||||
bool delayChkpt; /* true if this proc delays checkpoint start */
|
||||
/* previously called InCommit */
|
||||
|
||||
uint8 nxids;
|
||||
} PGXACT;
|
||||
|
@@ -52,8 +52,8 @@ extern bool TransactionIdIsActive(TransactionId xid);
|
||||
extern TransactionId GetOldestXmin(bool allDbs, bool ignoreVacuum);
|
||||
extern TransactionId GetOldestActiveTransactionId(void);
|
||||
|
||||
extern int GetTransactionsInCommit(TransactionId **xids_p);
|
||||
extern bool HaveTransactionsInCommit(TransactionId *xids, int nxids);
|
||||
extern VirtualTransactionId *GetVirtualXIDsDelayingChkpt(int *nvxids);
|
||||
extern bool HaveVirtualXIDsDelayingChkpt(VirtualTransactionId *vxids, int nvxids);
|
||||
|
||||
extern PGPROC *BackendPidGetProc(int pid);
|
||||
extern int BackendXidGetPid(TransactionId xid);
|
||||
|
Reference in New Issue
Block a user