From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix incorrect output from pgoutput when using column lists.
Date: Fri, 02 Dec 2022 05:45:14 +0000
Message-ID: <E1p0yrJ-001f6j-3H@gemulon.postgresql.org> (raw)
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(-)
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: akapila@postgresql.org
Subject: Re: pgsql: Fix incorrect output from pgoutput when using column lists.
In-Reply-To: <E1p0yrJ-001f6j-3H@gemulon.postgresql.org>
References: <E1p0yrJ-001f6j-3H@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