From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Make logical WAL sender report streaming state appropriately |
Date: | 2018-07-12 01:21:42 |
Message-ID: | E1fdQIg-00066z-3p@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Make logical WAL sender report streaming state appropriately
WAL senders sending logically-decoded data fail to properly report in
"streaming" state when starting up, hence as long as one extra record is
not replayed, such WAL senders would remain in a "catchup" state, which
is inconsistent with the physical cousin.
This can be easily reproduced by for example using pg_recvlogical and
restarting the upstream server. The TAP tests have been slightly
modified to detect the failure and strengthened so as future tests also
make sure that a node is in streaming state when waiting for its
catchup.
Backpatch down to 9.4 where this code has been introduced.
Reported-by: Sawada Masahiko
Author: Simon Riggs, Sawada Masahiko
Reviewed-by: Petr Jelinek, Michael Paquier, Vaishnavi Prabakaran
Discussion: https://postgr.es/m/CAD21AoB2ZbCCqOx=bgKMcLrAvs1V0ZMqzs7wBTuDySezTGtMZA@mail.gmail.com
Branch
------
REL_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/11abea37d5d16e553a93fc96fd95421090d78fe0
Modified Files
--------------
src/backend/replication/walsender.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-07-12 04:54:37 | pgsql: Add assertion in expand_vacuum_rel() for non-autovacuum path |
Previous Message | Peter Geoghegan | 2018-07-11 23:35:33 | Re: Tips on committing |