pgsql: Remove incorrect assertion for INSERT in logical replication's p - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Remove incorrect assertion for INSERT in logical replication's p
Date
Msg-id E1iqdZr-0000Vz-Qb@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/30104eca885637ecce1b48c958cf6ec733b93a3d

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(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Extensive code review for GSSAPI encryption mechanism.
Next
From: Tom Lane
Date:
Subject: pgsql: Fix edge-case crashes and misestimation in range containment sel