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: Remove incorrect assertion for INSERT in logical replication's p
Date: Sun, 12 Jan 2020 13:46:51 +0000
Message-ID: <E1iqdZr-0000Vt-PN@gemulon.postgresql.org> (raw)

Remove incorrect assertion for INSERT in logical replication's publisher

On the publisher, it was assumed that an INSERT change cannot happen for
a relation with no replica identity.  However this is true only for a
change that needs references to old rows, aka UPDATE or DELETE, so
trying to use logical replication with a relation that has no replica
identity led to an assertion failure in the publisher when issuing an
INSERT.  This commit removes the incorrect assertion, and adds more
regression tests to provide coverage for relations without replica
identity.

Reported-by: Neha Sharma
Author: Dilip Kumar, Michael Paquier
Reviewed-by: Andres Freund
Discussion: https://postgr.es/m/CANiYTQsL1Hb8_Km08qd32svrqNumXLJeoGo014O7VZymgOhZEA@mail.gmail.com
Backpatch-through: 10

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1088729e84cc382270c592ac8c57c323836f40ca

Modified Files
--------------
src/backend/replication/logical/proto.c    |  4 ----
src/test/subscription/t/001_rep_changes.pl | 16 ++++++++++++++--
2 files changed, 14 insertions(+), 6 deletions(-)



view thread (4+ messages)  latest in thread

Message-ID: <E1iqdZr-0000Vt-PN@gemulon.postgresql.org>
Permalink:  ../E1iqdZr-0000Vt-PN@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1iqdZr-0000Vt-PN@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: Remove incorrect assertion for INSERT in logical replication's p
  In-Reply-To: <E1iqdZr-0000Vt-PN@gemulon.postgresql.org>
  References: <E1iqdZr-0000Vt-PN@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