pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make logical WAL sender report streaming state appropriately
Date: Thu, 12 Jul 2018 01:21:42 +0000
Message-ID: <E1fdQIg-000671-3r@gemulon.postgresql.org> (raw)

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
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d5eb1fe0dc717acae5da610c47468d3472d646a4

Modified Files
--------------
src/backend/replication/walsender.c | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1fdQIg-000671-3r@gemulon.postgresql.org>
Permalink:  ../E1fdQIg-000671-3r@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1fdQIg-000671-3r@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Make logical WAL sender report streaming state appropriately
  In-Reply-To: <E1fdQIg-000671-3r@gemulon.postgresql.org>
  References: <E1fdQIg-000671-3r@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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