@@ -479,7 +479,7 @@ MarkAsPreparingGuts(GlobalTransaction gxact, TransactionId xid, const char *gid,
479479 }
480480 proc -> xid = xid ;
481481 Assert (proc -> xmin == InvalidTransactionId );
482- proc -> delayChkpt = 0 ;
482+ proc -> delayChkptFlags = 0 ;
483483 proc -> statusFlags = 0 ;
484484 proc -> pid = 0 ;
485485 proc -> databaseId = databaseid ;
@@ -1173,11 +1173,11 @@ EndPrepare(GlobalTransaction gxact)
11731173 * Now writing 2PC state data to WAL. We let the WAL's CRC protection
11741174 * cover us, so no need to calculate a separate CRC.
11751175 *
1176- * We have to set delayChkpt here, too; otherwise a checkpoint starting
1177- * immediately after the WAL record is inserted could complete without
1178- * fsync'ing our state file. (This is essentially the same kind of race
1179- * condition as the COMMIT-to-clog-write case that RecordTransactionCommit
1180- * uses delayChkpt for; see notes there.)
1176+ * We have to set DELAY_CHKPT_START here, too; otherwise a checkpoint
1177+ * starting immediately after the WAL record is inserted could complete
1178+ * without fsync'ing our state file. (This is essentially the same kind
1179+ * of race condition as the COMMIT-to-clog-write case that
1180+ * RecordTransactionCommit uses DELAY_CHKPT_START for; see notes there.)
11811181 *
11821182 * We save the PREPARE record's location in the gxact for later use by
11831183 * CheckPointTwoPhase.
@@ -1186,8 +1186,8 @@ EndPrepare(GlobalTransaction gxact)
11861186
11871187 START_CRIT_SECTION ();
11881188
1189- Assert ((MyProc -> delayChkpt & DELAY_CHKPT_START ) == 0 );
1190- MyProc -> delayChkpt |= DELAY_CHKPT_START ;
1189+ Assert ((MyProc -> delayChkptFlags & DELAY_CHKPT_START ) == 0 );
1190+ MyProc -> delayChkptFlags |= DELAY_CHKPT_START ;
11911191
11921192 XLogBeginInsert ();
11931193 for (record = records .head ; record != NULL ; record = record -> next )
@@ -1230,7 +1230,7 @@ EndPrepare(GlobalTransaction gxact)
12301230 * checkpoint starting after this will certainly see the gxact as a
12311231 * candidate for fsyncing.
12321232 */
1233- MyProc -> delayChkpt &= ~DELAY_CHKPT_START ;
1233+ MyProc -> delayChkptFlags &= ~DELAY_CHKPT_START ;
12341234
12351235 /*
12361236 * Remember that we have this GlobalTransaction entry locked for us. If
@@ -1817,7 +1817,7 @@ CheckPointTwoPhase(XLogRecPtr redo_horizon)
18171817 *
18181818 * Note that it isn't possible for there to be a GXACT with a
18191819 * prepare_end_lsn set prior to the last checkpoint yet is marked invalid,
1820- * because of the efforts with delayChkpt .
1820+ * because of the efforts with delayChkptFlags .
18211821 */
18221822 LWLockAcquire (TwoPhaseStateLock , LW_SHARED );
18231823 for (i = 0 ; i < TwoPhaseState -> numPrepXacts ; i ++ )
@@ -2275,7 +2275,7 @@ ProcessTwoPhaseBuffer(TransactionId xid,
22752275 * RecordTransactionCommitPrepared
22762276 *
22772277 * This is basically the same as RecordTransactionCommit (q.v. if you change
2278- * this function): in particular, we must set the delayChkpt flag to avoid a
2278+ * this function): in particular, we must set DELAY_CHKPT_START to avoid a
22792279 * race condition.
22802280 *
22812281 * We know the transaction made at least one XLOG entry (its PREPARE),
@@ -2308,8 +2308,8 @@ RecordTransactionCommitPrepared(TransactionId xid,
23082308 START_CRIT_SECTION ();
23092309
23102310 /* See notes in RecordTransactionCommit */
2311- Assert ((MyProc -> delayChkpt & DELAY_CHKPT_START ) == 0 );
2312- MyProc -> delayChkpt |= DELAY_CHKPT_START ;
2311+ Assert ((MyProc -> delayChkptFlags & DELAY_CHKPT_START ) == 0 );
2312+ MyProc -> delayChkptFlags |= DELAY_CHKPT_START ;
23132313
23142314 /*
23152315 * Emit the XLOG commit record. Note that we mark 2PC commits as
@@ -2358,7 +2358,7 @@ RecordTransactionCommitPrepared(TransactionId xid,
23582358 TransactionIdCommitTree (xid , nchildren , children );
23592359
23602360 /* Checkpoint can proceed now */
2361- MyProc -> delayChkpt &= ~DELAY_CHKPT_START ;
2361+ MyProc -> delayChkptFlags &= ~DELAY_CHKPT_START ;
23622362
23632363 END_CRIT_SECTION ();
23642364
0 commit comments