postgresql/src
Alexander Korotkov 05e6e78c18 Reset lastOverflowedXid on standby when needed
Currently, lastOverflowedXid is never reset.  It's just adjusted on new
transactions known to be overflowed.  But if there are no overflowed
transactions for a long time, snapshots could be mistakenly marked as
suboverflowed due to wraparound.

This commit fixes this issue by resetting lastOverflowedXid when needed
altogether with KnownAssignedXids.

Backpatch to all supported versions.

Reported-by: Stan Hu
Discussion: https://postgr.es/m/CAMBWrQ%3DFp5UAsU_nATY7EMY7NHczG4-DTDU%3DmCvBQZAQ6wa2xQ%40mail.gmail.com
Author: Kyotaro Horiguchi, Alexander Korotkov
Reviewed-by: Stan Hu, Simon Riggs, Nikolay Samokhvalov, Andrey Borodin, Dmitry Dolgov
2021-11-06 19:13:58 +03:00
..
backend Reset lastOverflowedXid on standby when needed 2021-11-06 19:13:58 +03:00
bin Mark mystreamer variable as PG_USED_FOR_ASSERTS_ONLY 2021-11-06 16:32:11 +01:00
common Fix memory leak in pg_hmac 2021-10-01 22:47:05 +02:00
fe_utils Replace unicode characters in comments with ascii 2021-11-01 22:42:49 +01:00
include Change ThisTimeLineID from a global variable to a local variable. 2021-11-05 12:53:15 -04:00
interfaces Fix check for trapping exit() calls in libpq 2021-10-04 21:04:11 +02:00
makefiles Add NO_INSTALL option to pgxs 2021-05-27 13:58:29 +02:00
pl plpgsql: report proper line number for errors in variable initialization. 2021-10-31 12:43:47 -04:00
port Speed up printing of integers in snprintf.c. 2021-10-28 13:39:57 -04:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Fix handling of NaN values in BRIN minmax multi 2021-11-06 01:50:44 +01:00
timezone Update time zone data files to tzdata release 2021e. 2021-10-29 11:38:18 -04:00
tools Un-break pg_basebackup's MSVC build. 2021-11-06 12:12:48 -04:00
tutorial doc: Prefer explicit JOIN syntax over old implicit syntax in tutorial 2021-04-08 10:51:26 +02:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Add support for LZ4 compression in pg_receivewal 2021-11-05 11:33:25 +09:00
Makefile.shlib AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:27:59 -07:00
nls-global.mk Add errhint_plural() function and make use of it 2021-03-31 09:16:25 +02:00