Skip to content

Commit cac0e36

Browse files
Revert bf08f22
Remove recent changes to logging XLOG_RUNNING_XACTS by request.
1 parent 3fe3511 commit cac0e36

File tree

2 files changed

+1
-25
lines changed

2 files changed

+1
-25
lines changed

src/backend/postmaster/bgwriter.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,8 @@ BackgroundWriterMain(void)
330330
if (now >= timeout &&
331331
last_snapshot_lsn != GetXLogInsertRecPtr())
332332
{
333-
XLogRecPtr log_standby_lsn = LogStandbySnapshot();
334-
333+
last_snapshot_lsn = LogStandbySnapshot();
335334
last_snapshot_ts = now;
336-
if (!XLogRecPtrIsInvalid(log_standby_lsn))
337-
last_snapshot_lsn = log_standby_lsn;
338335
}
339336
}
340337

src/backend/storage/ipc/standby.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,6 @@ LogStandbySnapshot(void)
902902
RunningTransactions running;
903903
xl_standby_lock *locks;
904904
int nlocks;
905-
static bool last_snapshot_overflowed = false;
906905

907906
Assert(XLogStandbyInfoActive());
908907

@@ -933,28 +932,8 @@ LogStandbySnapshot(void)
933932
* only a shared lock.
934933
*/
935934
if (wal_level < WAL_LEVEL_LOGICAL)
936-
{
937935
LWLockRelease(ProcArrayLock);
938936

939-
/*
940-
* Don't bother to log anything if nothing is happening, if we are
941-
* using archive_timeout > 0 and we didn't overflow snapshot last time.
942-
*
943-
* This ensures that we don't issue an empty WAL record, which can
944-
* be annoying when used in conjunction with archive timeout.
945-
*/
946-
if (running->xcnt == 0 &&
947-
nlocks == 0 &&
948-
XLogArchiveTimeout > 0 &&
949-
!last_snapshot_overflowed)
950-
{
951-
LWLockRelease(XidGenLock);
952-
return InvalidXLogRecPtr;
953-
}
954-
955-
last_snapshot_overflowed = running->subxid_overflow;
956-
}
957-
958937
recptr = LogCurrentRunningXacts(running);
959938

960939
/* Release lock if we kept it longer ... */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy