Skip to content

Commit 6fa04b3

Browse files
committed
More cosmetic changes
1 parent 3865fc6 commit 6fa04b3

File tree

5 files changed

+1
-39
lines changed

5 files changed

+1
-39
lines changed

src/backend/access/transam/xact.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,18 +1489,11 @@ RecordTransactionCommit(void)
14891489
* anyway if we crash.)
14901490
*/
14911491

1492-
//XLogRecPtr remoteFlushLSN = ((volatile WalSndCtlData *) WalSndCtl)->lsn[Min(synchronous_commit, SYNC_REP_WAIT_APPLY)];
1493-
1494-
//elog(INFO, "maxLSN = (%d), remoteflushlsn = (%d), active backends = (%d)", maxLSN, remoteFlushLSN, MinimumActiveBackends(1));
14951492

14961493
if ((wrote_xlog && markXidCommitted &&
14971494
synchronous_commit > SYNCHRONOUS_COMMIT_OFF) ||
14981495
forceSyncCommit || nrels > 0)
14991496
{
1500-
//XLogRecPtr maxLSN = XLogGetMaxLSN(0);
1501-
//elog(INFO, "XactLastRecEnd=(%d), maxLSN=(%d), WalSndCtl->lsn[mode]=(%d, %d, %d)", XactLastRecEnd, maxLSN, WalSndCtl->lsn[0], WalSndCtl->lsn[1], WalSndCtl->lsn[2]);
1502-
//XLogFlush(XactLastRecEnd);
1503-
15041497
/*
15051498
* Now we may update the CLOG, if we wrote a COMMIT record above
15061499
*/
@@ -1557,10 +1550,6 @@ RecordTransactionCommit(void)
15571550
* in the procarray and continue to hold locks.
15581551
*/
15591552

1560-
//elog(INFO, "xid = (%d), xmin = (%d), xmax = (%d)", xid, MyProc->xmin,XidFromFullTransactionId(ShmemVariableCache->latestCompletedXid));
1561-
//if (wrote_xlog && markXidCommitted)
1562-
// SyncRepWaitForLSN(XactLastRecEnd, true);
1563-
15641553
/* remember end of last commit record */
15651554
XactLastCommitEnd = XactLastRecEnd;
15661555

src/backend/replication/syncrep.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,6 @@ static bool SyncRepGetSyncRecPtr(XLogRecPtr *writePtr,
105105
XLogRecPtr *flushPtr,
106106
XLogRecPtr *applyPtr,
107107
bool *am_sync);
108-
static bool SyncRepGetLatestSyncRecPtr(XLogRecPtr *writePtr,
109-
XLogRecPtr *flushPtr,
110-
XLogRecPtr *applyPtr);
111-
static void SyncRepGetNewestSyncRecPtr(XLogRecPtr *writePtr,
112-
XLogRecPtr *flushPtr,
113-
XLogRecPtr *applyPtr,
114-
SyncRepStandbyData *sync_standbys,
115-
int num_standbys);
116108
static void SyncRepGetOldestSyncRecPtr(XLogRecPtr *writePtr,
117109
XLogRecPtr *flushPtr,
118110
XLogRecPtr *applyPtr,
@@ -153,7 +145,7 @@ static bool SyncRepQueueIsOrderedByLSN(int mode);
153145
* remote_apply, because only commit records provide apply feedback.
154146
*/
155147
void
156-
SyncRepWaitForLSN(XLogRecPtr lsn, bool commit /*, bool readOnlyWait */)
148+
SyncRepWaitForLSN(XLogRecPtr lsn, bool commit)
157149
{
158150
char *new_status = NULL;
159151
const char *old_status;
@@ -206,7 +198,6 @@ SyncRepWaitForLSN(XLogRecPtr lsn, bool commit /*, bool readOnlyWait */)
206198
if (!WalSndCtl->sync_standbys_defined ||
207199
lsn <= WalSndCtl->lsn[mode])
208200
{
209-
//elog(INFO, "early return from syncrep");
210201
LWLockRelease(SyncRepLock);
211202
return;
212203
}
@@ -596,7 +587,6 @@ SyncRepGetSyncRecPtr(XLogRecPtr *writePtr, XLogRecPtr *flushPtr,
596587
*/
597588
if (!(*am_sync) || num_standbys < SyncRepConfig->num_sync)
598589
{
599-
//elog(INFO, "Not enough standbys, returning. num_standbys = (%d), num_sync = (%d)", num_standbys, SyncRepConfig->num_sync);
600590
pfree(sync_standbys);
601591
return false;
602592
}
@@ -907,7 +897,6 @@ SyncRepWakeQueue(bool all, int mode)
907897
* Assume the queue is ordered by LSN
908898
*/
909899

910-
//elog(INFO, "In SyncRepWakeQueue. walsndctl->lsn = (%d), proc->waitlsn = (%d)", walsndctl->lsn[mode], proc->waitLSN);
911900
if (!all && walsndctl->lsn[mode] < proc->waitLSN)
912901
return numprocs;
913902

src/backend/replication/walsender.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,6 @@ SendTimeLineHistory(TimeLineHistoryCmd *cmd)
685685
static void
686686
StartReplication(StartReplicationCmd *cmd)
687687
{
688-
//elog(INFO, "in start replication");
689688
StringInfoData buf;
690689
XLogRecPtr FlushPtr;
691690
TimeLineID FlushTLI;
@@ -803,11 +802,9 @@ StartReplication(StartReplicationCmd *cmd)
803802

804803
streamingDoneSending = streamingDoneReceiving = false;
805804

806-
//elog(INFO, "before entering copy mode");
807805
/* If there is nothing to stream, don't even enter COPY mode */
808806
if (!sendTimeLineIsHistoric || cmd->startpoint < sendTimeLineValidUpto)
809807
{
810-
//elog(INFO, "inside copy mode if cond");
811808
/*
812809
* When we first start replication the standby will be behind the
813810
* primary. For some applications, for example synchronous
@@ -838,7 +835,6 @@ StartReplication(StartReplicationCmd *cmd)
838835
LSN_FORMAT_ARGS(FlushPtr))));
839836
}
840837

841-
//elog(INFO, "started streaming");
842838
/* Start streaming from the requested point */
843839
sentPtr = cmd->startpoint;
844840

@@ -860,7 +856,6 @@ StartReplication(StartReplicationCmd *cmd)
860856
WalSndSetState(WALSNDSTATE_STARTUP);
861857

862858
Assert(streamingDoneSending && streamingDoneReceiving);
863-
//elog(INFO, "done streaming");
864859
}
865860

866861
if (cmd->slotname)
@@ -1430,7 +1425,6 @@ WalSndWriteData(LogicalDecodingContext *ctx, XLogRecPtr lsn, TransactionId xid,
14301425
static void
14311426
ProcessPendingWrites(void)
14321427
{
1433-
//elog(INFO, "walsend waiting for a write");
14341428
for (;;)
14351429
{
14361430
long sleeptime;
@@ -1471,8 +1465,6 @@ ProcessPendingWrites(void)
14711465
WalSndShutdown();
14721466
}
14731467

1474-
//elog(INFO, "walsender latch set!");
1475-
14761468
/* reactivate latch so WalSndLoop knows to continue */
14771469
SetLatch(MyLatch);
14781470
}
@@ -1575,7 +1567,6 @@ WalSndWaitForWal(XLogRecPtr loc)
15751567

15761568
for (;;)
15771569
{
1578-
//elog(INFO, "in walsndwaitforwal");
15791570
long sleeptime;
15801571

15811572
/* Clear any already-pending wakeups */
@@ -1673,8 +1664,6 @@ WalSndWaitForWal(XLogRecPtr loc)
16731664
if (pq_is_send_pending())
16741665
wakeEvents |= WL_SOCKET_WRITEABLE;
16751666

1676-
//elog(INFO, "Waiting for walsndwait");
1677-
16781667
WalSndWait(wakeEvents, sleeptime, WAIT_EVENT_WAL_SENDER_WAIT_WAL);
16791668
}
16801669

src/backend/storage/ipc/procarray.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,9 +2352,6 @@ GetSnapshotData(Snapshot snapshot)
23522352
if (NormalTransactionIdPrecedes(xid, xmin))
23532353
xmin = xid;
23542354

2355-
//if(allProcs[arrayP->pgprocnos[pgxactoff]].syncRepState == 1)
2356-
// continue;
2357-
23582355
/* Add XID to snapshot. */
23592356
xip[count++] = xid;
23602357

src/backend/tcop/postgres.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,8 +1044,6 @@ exec_simple_query(const char *query_string)
10441044
*/
10451045
parsetree_list = pg_parse_query(query_string);
10461046

1047-
//elog(FATAL, "just testing here");
1048-
10491047
/* Log immediately if dictated by log_statement */
10501048
if (check_log_statement(parsetree_list))
10511049
{

0 commit comments

Comments
 (0)