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: Fix crash in WAL sender when starting physical replication
Date: Mon, 08 Jun 2020 01:13:29 +0000
Message-ID: <E1ji6Lx-0002bT-LC@gemulon.postgresql.org> (raw)

Fix crash in WAL sender when starting physical replication

Since database connections can be used with WAL senders in 9.4, it is
possible to use physical replication.  This commit fixes a crash when
starting physical replication with a WAL sender using a database
connection, caused by the refactoring done in 850196b.

There have been discussions about forbidding the use of physical
replication in a database connection, but this is left for later,
taking care only of the crash new to 13.

While on it, add a test to check for a failure when attempting logical
replication if the WAL sender does not have a database connection.  This
part is extracted from a larger patch by Kyotaro Horiguchi.

Reported-by: Vladimir Sitnikov
Author: Michael Paquier, Kyotaro Horiguchi
Reviewed-by: Kyotaro Horiguchi, Álvaro Herrera
Discussion: https://postgr.es/m/CAB=Je-GOWMj1PTPkeUhjqQp-4W3=nW-pXe2Hjax6rJFffB5_Aw@mail.gmail.com
Backpatch-through: 13

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/879ad9f90e83b94db14b8be11f1cc1fb38187cc0

Modified Files
--------------
src/backend/access/transam/xlogreader.c     |  4 ++-
src/backend/replication/walsender.c         | 38 ++++++++++++++---------------
src/include/access/xlogreader.h             |  4 ---
src/test/recovery/t/006_logical_decoding.pl | 11 ++++++++-
4 files changed, 31 insertions(+), 26 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1ji6Lx-0002bT-LC@gemulon.postgresql.org>
Permalink:  ../E1ji6Lx-0002bT-LC@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ji6Lx-0002bT-LC@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: Fix crash in WAL sender when starting physical replication
  In-Reply-To: <E1ji6Lx-0002bT-LC@gemulon.postgresql.org>
  References: <E1ji6Lx-0002bT-LC@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