@@ -219,22 +219,18 @@ StandbyCheckPointTwoPhase(XLogRecPtr redo_horizon)
219219
220220 // Assert(RecoveryInProgress());
221221
222- elog (WARNING , "StandbyCheckPointTwoPhase" );
223-
224222 TRACE_POSTGRESQL_TWOPHASE_CHECKPOINT_START ();
225223
226224 dlist_foreach_modify (miter , & StandbyTwoPhaseStateData )
227225 {
228226 StandbyPreparedTransaction * xact = dlist_container (StandbyPreparedTransaction ,
229227 list_node , miter .cur );
230228
231- if (redo_horizon == 0 || xact -> prepare_end_lsn <= redo_horizon )
232- // if (true)
229+ if (redo_horizon == InvalidXLogRecPtr || xact -> prepare_end_lsn <= redo_horizon )
233230 {
234231 char * buf ;
235232 int len ;
236233
237- fprintf (stderr , "2PC: checkpoint: %x --> %d (horizon: %x)\n" , xact -> prepare_start_lsn , xact -> xid , redo_horizon );
238234 XlogReadTwoPhaseData (xact -> prepare_start_lsn , & buf , & len );
239235 RecreateTwoPhaseFile (xact -> xid , buf , len );
240236 pfree (buf );
@@ -270,8 +266,6 @@ StandbyAtCommit(TransactionId xid)
270266
271267 if (xact -> xid == xid )
272268 {
273- // pfree(xact);
274- fprintf (stderr , "2PC: commit: %x/%d\n" , xact -> prepare_start_lsn , xact -> xid );
275269 dlist_delete (miter .cur );
276270 return ;
277271 }
@@ -1746,8 +1740,6 @@ StandbyAtPrepare(XLogReaderState *record)
17461740 xact -> prepare_start_lsn = record -> ReadRecPtr ;
17471741 xact -> prepare_end_lsn = record -> EndRecPtr ;
17481742
1749- fprintf (stderr , "2PC: at_prepare: %x/%d\n" , xact -> prepare_start_lsn , xact -> xid );
1750-
17511743 dlist_push_tail (& StandbyTwoPhaseStateData , & xact -> list_node );
17521744}
17531745
@@ -1789,7 +1781,6 @@ PrescanPreparedTransactions(TransactionId **xids_p, int *nxids_p)
17891781 int nxids = 0 ;
17901782 int allocsize = 0 ;
17911783
1792- fprintf (stderr , "--- PrescanPreparedTransactions\n" );
17931784 StandbyCheckPointTwoPhase (0 );
17941785
17951786 cldir = AllocateDir (TWOPHASE_DIR );
@@ -1928,8 +1919,6 @@ StandbyRecoverPreparedTransactions(bool overwriteOK)
19281919 DIR * cldir ;
19291920 struct dirent * clde ;
19301921
1931- fprintf (stderr , "--- StandbyRecoverPreparedTransactions\n" );
1932-
19331922 cldir = AllocateDir (TWOPHASE_DIR );
19341923 while ((clde = ReadDir (cldir , TWOPHASE_DIR )) != NULL )
19351924 {
@@ -2013,8 +2002,6 @@ RecoverPreparedTransactions(void)
20132002 struct dirent * clde ;
20142003 bool overwriteOK = false;
20152004
2016- fprintf (stderr , "--- RecoverPreparedTransactions\n" );
2017-
20182005 snprintf (dir , MAXPGPATH , "%s" , TWOPHASE_DIR );
20192006
20202007 cldir = AllocateDir (dir );
0 commit comments