@@ -479,7 +479,7 @@ MarkAsPreparingGuts(GlobalTransaction gxact, TransactionId xid, const char *gid,
479
479
}
480
480
proc -> xid = xid ;
481
481
Assert (proc -> xmin == InvalidTransactionId );
482
- proc -> delayChkpt = 0 ;
482
+ proc -> delayChkptFlags = 0 ;
483
483
proc -> statusFlags = 0 ;
484
484
proc -> pid = 0 ;
485
485
proc -> databaseId = databaseid ;
@@ -1173,11 +1173,11 @@ EndPrepare(GlobalTransaction gxact)
1173
1173
* Now writing 2PC state data to WAL. We let the WAL's CRC protection
1174
1174
* cover us, so no need to calculate a separate CRC.
1175
1175
*
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.)
1181
1181
*
1182
1182
* We save the PREPARE record's location in the gxact for later use by
1183
1183
* CheckPointTwoPhase.
@@ -1186,8 +1186,8 @@ EndPrepare(GlobalTransaction gxact)
1186
1186
1187
1187
START_CRIT_SECTION ();
1188
1188
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 ;
1191
1191
1192
1192
XLogBeginInsert ();
1193
1193
for (record = records .head ; record != NULL ; record = record -> next )
@@ -1230,7 +1230,7 @@ EndPrepare(GlobalTransaction gxact)
1230
1230
* checkpoint starting after this will certainly see the gxact as a
1231
1231
* candidate for fsyncing.
1232
1232
*/
1233
- MyProc -> delayChkpt &= ~DELAY_CHKPT_START ;
1233
+ MyProc -> delayChkptFlags &= ~DELAY_CHKPT_START ;
1234
1234
1235
1235
/*
1236
1236
* Remember that we have this GlobalTransaction entry locked for us. If
@@ -1817,7 +1817,7 @@ CheckPointTwoPhase(XLogRecPtr redo_horizon)
1817
1817
*
1818
1818
* Note that it isn't possible for there to be a GXACT with a
1819
1819
* 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 .
1821
1821
*/
1822
1822
LWLockAcquire (TwoPhaseStateLock , LW_SHARED );
1823
1823
for (i = 0 ; i < TwoPhaseState -> numPrepXacts ; i ++ )
@@ -2275,7 +2275,7 @@ ProcessTwoPhaseBuffer(TransactionId xid,
2275
2275
* RecordTransactionCommitPrepared
2276
2276
*
2277
2277
* 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
2279
2279
* race condition.
2280
2280
*
2281
2281
* We know the transaction made at least one XLOG entry (its PREPARE),
@@ -2308,8 +2308,8 @@ RecordTransactionCommitPrepared(TransactionId xid,
2308
2308
START_CRIT_SECTION ();
2309
2309
2310
2310
/* 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 ;
2313
2313
2314
2314
/*
2315
2315
* Emit the XLOG commit record. Note that we mark 2PC commits as
@@ -2358,7 +2358,7 @@ RecordTransactionCommitPrepared(TransactionId xid,
2358
2358
TransactionIdCommitTree (xid , nchildren , children );
2359
2359
2360
2360
/* Checkpoint can proceed now */
2361
- MyProc -> delayChkpt &= ~DELAY_CHKPT_START ;
2361
+ MyProc -> delayChkptFlags &= ~DELAY_CHKPT_START ;
2362
2362
2363
2363
END_CRIT_SECTION ();
2364
2364
0 commit comments