pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Restore replication protocol's duplicate command tags
Date: Wed, 14 Oct 2020 23:16:27 +0000
Message-ID: <E1kSq0R-0004Mm-2S@gemulon.postgresql.org> (raw)

Restore replication protocol's duplicate command tags

I removed the duplicate command tags for START_REPLICATION inadvertently
in commit 07082b08cc5d, but the replication protocol requires them.  The
fact that the replication protocol was broken was not noticed because
all our test cases use an optimized code path that exits early, failing
to verify that the behavior is correct for non-optimized cases.  Put
them back.

Also document this protocol quirk.

Add a test case that shows the failure.  It might still succeed even
without the patch when run on a fast enough server, but it suffices to
show the bug in enough cases that it would be noticed in buildfarm.

Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
Reported-by: Henry Hinze <henry.hinze@gmail.com>
Reviewed-by: Petr Jelínek <petr.jelinek@2ndquadrant.com>
Discussion: https://postgr.es/m/16643-eaadeb2a1a58d28c@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4e9821b6fac5042e872d5397f711a67984b165f8

Modified Files
--------------
doc/src/sgml/protocol.sgml               |  8 +++--
src/backend/replication/logical/worker.c |  1 -
src/backend/replication/walsender.c      |  3 +-
src/test/subscription/t/100_bugs.pl      | 55 +++++++++++++++++++++++++++++++-
4 files changed, 61 insertions(+), 6 deletions(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1kSq0R-0004Mm-2S@gemulon.postgresql.org>
Permalink:  ../E1kSq0R-0004Mm-2S@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kSq0R-0004Mm-2S@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: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Restore replication protocol's duplicate command tags
  In-Reply-To: <E1kSq0R-0004Mm-2S@gemulon.postgresql.org>
  References: <E1kSq0R-0004Mm-2S@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