pgsql: Fix nextXid tracking bug on standbys (9.5-11 only).

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема pgsql: Fix nextXid tracking bug on standbys (9.5-11 only).
Дата
Msg-id E1jCGGK-00050C-Dt@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: pgsql: Fix nextXid tracking bug on standbys (9.5-11 only).
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Refactor compile-time assertion checks in c.h