File tree Expand file tree Collapse file tree 2 files changed +1
-25
lines changed Expand file tree Collapse file tree 2 files changed +1
-25
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 ... */
You can’t perform that action at this time.
0 commit comments