pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix incorrect output from pgoutput when using column lists.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix incorrect output from pgoutput when using column lists.
@ 2022-12-02 05:45  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Amit Kapila @ 2022-12-02 05:45 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix incorrect output from pgoutput when using column lists.

For Updates and Deletes, we were not honoring the columns list for old
tuple values while sending tuple data via pgoutput. This results in
pgoutput emitting more columns than expected.

This is not a problem for built-in logical replication as we simply ignore
additional columns based on the relation information sent previously which
didn't have those columns. However, some other users of pgoutput plugin
may expect the columns as per the column list. Also, sending extra columns
unnecessarily consumes network bandwidth defeating the purpose of the
column list feature.

Reported-by: Gunnar Morling
Author: Hou Zhijie
Reviewed-by: Amit Kapila
Backpatch-through: 15
Discussion: https://postgr.es/m/CADGJaX9kiRZ-OH0EpWF5Fkyh1ZZYofoNRCrhapBfdk02tj5EKg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/40b1491357a4a092ea054176944cf76e2fe3eff8

Modified Files
--------------
src/backend/replication/logical/proto.c     |  7 +++---
src/backend/replication/pgoutput/pgoutput.c |  6 ++++--
src/include/replication/logicalproto.h      |  2 +-
src/test/subscription/t/031_column_list.pl  | 33 +++++++++++++++++++++++++++++
4 files changed, 42 insertions(+), 6 deletions(-)



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

* pgsql: Fix incorrect output from pgoutput when using column lists.
@ 2022-12-02 05:45  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Amit Kapila @ 2022-12-02 05:45 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix incorrect output from pgoutput when using column lists.

For Updates and Deletes, we were not honoring the columns list for old
tuple values while sending tuple data via pgoutput. This results in
pgoutput emitting more columns than expected.

This is not a problem for built-in logical replication as we simply ignore
additional columns based on the relation information sent previously which
didn't have those columns. However, some other users of pgoutput plugin
may expect the columns as per the column list. Also, sending extra columns
unnecessarily consumes network bandwidth defeating the purpose of the
column list feature.

Reported-by: Gunnar Morling
Author: Hou Zhijie
Reviewed-by: Amit Kapila
Backpatch-through: 15
Discussion: https://postgr.es/m/CADGJaX9kiRZ-OH0EpWF5Fkyh1ZZYofoNRCrhapBfdk02tj5EKg@mail.gmail.com

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ebf87c019c042a33cf9d2810c1fe360ddc7f8e93

Modified Files
--------------
src/backend/replication/logical/proto.c     |  7 +++---
src/backend/replication/pgoutput/pgoutput.c |  6 ++++--
src/include/replication/logicalproto.h      |  2 +-
src/test/subscription/t/031_column_list.pl  | 33 +++++++++++++++++++++++++++++
4 files changed, 42 insertions(+), 6 deletions(-)



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


end of thread, other threads:[~2022-12-02 05:45 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-12-02 05:45 pgsql: Fix incorrect output from pgoutput when using column lists. Amit Kapila <akapila@postgresql.org>
2022-12-02 05:45 pgsql: Fix incorrect output from pgoutput when using column lists. Amit Kapila <akapila@postgresql.org>

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