Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcac0e36

Browse files
Revertbf08f22
Remove recent changes to logging XLOG_RUNNING_XACTS by request.
1 parent3fe3511 commitcac0e36

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-
XLogRecPtrlog_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
RunningTransactionsrunning;
903903
xl_standby_lock*locks;
904904
intnlocks;
905-
staticboollast_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-
returnInvalidXLogRecPtr;
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)

[8]ページ先頭

©2009-2025 Movatter.jp