proc->lxid = InvalidLocalTransactionId;
proc->xmin = InvalidTransactionId;
proc->recoveryConflictMode = 0;
- proc->recoveryConflictLSN = InvalidXLogRecPtr;
/* redundant, but just in case */
proc->vacuumFlags &= ~PROC_VACUUM_STATE_MASK;
numHeldLocks += proc->numHeldLocks;
/*
- * Save subtransaction XIDs.
- *
- * The other backend can add more subxids concurrently, but cannot
- * remove any. Hence it's important to fetch nxids just once. Should
- * be safe to use memcpy, though. (We needn't worry about missing any
- * xids added concurrently, because they must postdate xmax.)
- *
- * Again, our own XIDs *are* included in the snapshot.
+ * Save subtransaction XIDs. Other backends can't remove entries while
+ * we are holding ProcArrayLock, nor add new entries because we hold
+ * hold XidGenLock.
*/
nxids = proc->subxids.nxids;
* Note that this is an atomic change and requires no locking.
*/
if (proc->recoveryConflictMode < cancel_mode)
- {
- if (cancel_mode == ERROR &&
- XLByteLT(proc->recoveryConflictLSN, conflict_lsn))
- proc->recoveryConflictLSN = conflict_lsn;
-
proc->recoveryConflictMode = cancel_mode;
- }
/*
* Do we expect it to talk? No, Mr. Bond, we expect it to die.
int numHeldLocks; /* Number of AccessExclusiveLocks held by
* current backend. */
/*
- * InHotStandby mode, the lsn of the first conflict, if any.
- * Any block seen with changes made after this lsn will trigger
- * query cancelation. Always set recoveryConflictCancelMode after
- * setting conflictLSN so we can check this without spin locking.
+ * While in Hot Standby mode, setting recoveryConflictMode instructs the
+ * backend to commit suicide.
*/
- XLogRecPtr recoveryConflictLSN;
int recoveryConflictMode;
/* Info about LWLock the process is currently waiting for, if any. */