pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Ignore dropped and generated columns from the column list.
Date: Fri, 13 Jan 2023 09:41:29 +0000
Message-ID: <E1pGGYz-003RFr-5k@gemulon.postgresql.org> (raw)

Ignore dropped and generated columns from the column list.

We don't allow different column lists for the same table in the different
publications of the single subscription. A publication with a column list
except for dropped and generated columns should be considered the same as
a publication with no column list (which implicitly includes all columns
as part of the columns list). However, as we were not excluding the
dropped and generated columns from the column list combining such
publications leads to an error "cannot use different column lists for
table ...".

We decided not to backpatch this fix as there is a risk of users seeing
this as a behavior change and also we didn't see any field report of this
case.

Author: Shi yu
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/OSZPR01MB631091CCBC56F195B1B9ACB0FDFE9@OSZPR01MB6310.jpnprd01.prod.outlook.com

Branch
------
master

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

Modified Files
--------------
src/backend/catalog/pg_publication.c        | 30 ++++++++++++++++++
src/backend/catalog/system_views.sql        |  5 ++-
src/backend/replication/pgoutput/pgoutput.c | 17 ++++++++++-
src/include/catalog/catversion.h            |  2 +-
src/test/regress/expected/rules.out         |  2 +-
src/test/subscription/t/031_column_list.pl  | 47 +++++++++++++++++++++++++++++
6 files changed, 97 insertions(+), 6 deletions(-)



Message-ID: <E1pGGYz-003RFr-5k@gemulon.postgresql.org>
Permalink:  ../E1pGGYz-003RFr-5k@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pGGYz-003RFr-5k@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: akapila@postgresql.org
  Subject: Re: pgsql: Ignore dropped and generated columns from the column list.
  In-Reply-To: <E1pGGYz-003RFr-5k@gemulon.postgresql.org>
  References: <E1pGGYz-003RFr-5k@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