postgresql/src
Thomas Munro 4e8cad2da3 Fix nextXid tracking bug on standbys (9.5-11 only).
RecordKnownAssignedTransactionIds() should never move
nextXid backwards.  Before this commit, that could happen
if some other code path had advanced it without advancing
latestObservedXid.

One consequence is that a well timed XLOG_CHECKPOINT_ONLINE
could cause hot standby feedback messages to get confused
and report an xmin from a future epoch, potentially allowing
vacuum to run too soon on the primary.

Repair, by making sure RecordKnownAssignedTransactionIds()
can only move nextXid forwards.

In release 12 and master, this was already done by commit
2fc7af5e, which consolidated similar code and straightened
out this bug.  Back-patch to supported releases before that.

Author: Eka Palamadai <ekanatha@amazon.com>
Discussion: https://postgr.es/m/98BB4805-D0A2-48E1-96F4-15014313EADC@amazon.com
2020-03-12 18:16:44 +13:00
..
backend Fix nextXid tracking bug on standbys (9.5-11 only). 2020-03-12 18:16:44 +13:00
bin Add pg_dump support for ALTER obj DEPENDS ON EXTENSION 2020-03-11 16:54:54 -03:00
common Fix portability failure introduced in commits d2b0b60e7 et al. 2018-12-26 15:30:30 -05:00
fe_utils Fix translation of special characters in psql's LaTeX output modes. 2018-11-26 17:32:51 -05:00
include Avoid duplicates in ALTER ... DEPENDS ON EXTENSION 2020-03-11 11:04:59 -03:00
interfaces Stamp 9.6.17. 2020-02-10 17:21:38 -05:00
makefiles Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:36 -04:00
pl Fix confusion about event trigger vs. plain function in plpgsql. 2020-02-19 14:44:58 -05:00
port Stamp 9.6.17. 2020-02-10 17:21:38 -05:00
template Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:36 -04:00
test Add pg_dump support for ALTER obj DEPENDS ON EXTENSION 2020-03-11 16:54:54 -03:00
timezone Update time zone data files to tzdata release 2019c. 2019-09-20 19:54:20 -04:00
tools Handle spaces in OpenSSL install location for MSVC 2019-10-04 15:39:02 -04:00
tutorial Update copyright for 2016 2016-01-02 13:33:40 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS
Makefile Install TAP test infrastructure so it's available for extension testing. 2016-09-23 15:50:00 -04:00
Makefile.global.in Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:36 -04:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00