pgsql: Refrain from duplicating data in reorderbuffers

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: Refrain from duplicating data in reorderbuffers
Дата
Msg-id E1etKFH-0003kt-ND@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Refrain from duplicating data in reorderbuffers

If a walsender exits leaving data in reorderbuffers, the next walsender
that tries to decode the same transaction would append its decoded data
in the same spill files without truncating it first, which effectively
duplicate the data.  Avoid that by removing any leftover reorderbuffer
spill files when a walsender starts.

Backpatch to 9.4; this bug has been there from the very beginning of
logical decoding.

Author: Craig Ringer, revised by me
Reviewed by: Álvaro Herrera, Petr Jelínek, Masahiko Sawada

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8e5c2afa98d9c28c9883c4c42890f3a6dd99ba4e

Modified Files
--------------
src/backend/replication/logical/reorderbuffer.c | 137 ++++++++++++++----------
1 file changed, 82 insertions(+), 55 deletions(-)


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Fix expected error message in test
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: doc: Add replication parameter to libpq documentation