pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Remove incorrect assertion for INSERT in logical replication's p
4+ messages / 1 participants
[nested] [flat]

* pgsql: Remove incorrect assertion for INSERT in logical replication's p
@ 2020-01-12 13:46  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 4+ messages in thread

From: Michael Paquier @ 2020-01-12 13:46 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7eb6217db9ed46745b5cf999febc9641c626c270

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Remove incorrect assertion for INSERT in logical replication's p
@ 2020-01-12 13:46  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 4+ messages in thread

From: Michael Paquier @ 2020-01-12 13:46 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Remove incorrect assertion for INSERT in logical replication's p
@ 2020-01-12 13:46  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 4+ messages in thread

From: Michael Paquier @ 2020-01-12 13:46 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Remove incorrect assertion for INSERT in logical replication's p
@ 2020-01-12 13:46  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 4+ messages in thread

From: Michael Paquier @ 2020-01-12 13:46 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7c21a964ef8a3b51f1fe0571054343ac0941008e

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2020-01-12 13:46 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-01-12 13:46 pgsql: Remove incorrect assertion for INSERT in logical replication's p Michael Paquier <michael@paquier.xyz>
2020-01-12 13:46 pgsql: Remove incorrect assertion for INSERT in logical replication's p Michael Paquier <michael@paquier.xyz>
2020-01-12 13:46 pgsql: Remove incorrect assertion for INSERT in logical replication's p Michael Paquier <michael@paquier.xyz>
2020-01-12 13:46 pgsql: Remove incorrect assertion for INSERT in logical replication's p Michael Paquier <michael@paquier.xyz>

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