pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix nextXid tracking bug on standbys (9.5-11 only). 4+ messages / 1 participants [nested] [flat]
* pgsql: Fix nextXid tracking bug on standbys (9.5-11 only). @ 2020-03-12 05:19 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Thomas Munro @ 2020-03-12 05:19 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a493f933422c97f40584efbd07c3e6884ed3ace3 Modified Files -------------- src/backend/storage/ipc/procarray.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix nextXid tracking bug on standbys (9.5-11 only). @ 2020-03-12 05:19 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Thomas Munro @ 2020-03-12 05:19 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/05e0aff58446203d01dfc16717866df769e4e25e Modified Files -------------- src/backend/storage/ipc/procarray.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix nextXid tracking bug on standbys (9.5-11 only). @ 2020-03-12 05:19 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Thomas Munro @ 2020-03-12 05:19 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4e8cad2da36adff877c81d8c336d7c28ed19ebae Modified Files -------------- src/backend/storage/ipc/procarray.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix nextXid tracking bug on standbys (9.5-11 only). @ 2020-03-12 05:20 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Thomas Munro @ 2020-03-12 05:20 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d22ac5378fbd9605dceabe1546f737ee005fb7b1 Modified Files -------------- src/backend/storage/ipc/procarray.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2020-03-12 05:20 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-03-12 05:19 pgsql: Fix nextXid tracking bug on standbys (9.5-11 only). Thomas Munro <tmunro@postgresql.org> 2020-03-12 05:19 pgsql: Fix nextXid tracking bug on standbys (9.5-11 only). Thomas Munro <tmunro@postgresql.org> 2020-03-12 05:19 pgsql: Fix nextXid tracking bug on standbys (9.5-11 only). Thomas Munro <tmunro@postgresql.org> 2020-03-12 05:20 pgsql: Fix nextXid tracking bug on standbys (9.5-11 only). Thomas Munro <tmunro@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox