Ignore dropped and generated columns from the column list.
authorAmit Kapila <akapila@postgresql.org>
Fri, 13 Jan 2023 09:19:23 +0000 (14:49 +0530)
committerAmit Kapila <akapila@postgresql.org>
Fri, 13 Jan 2023 09:19:23 +0000 (14:49 +0530)
commitb7ae03953690a1dee455ba3823cc8f71a72cbe1d
treec427ef729c28f708b01a5b56536509c0f570d280
parentdca8b01f5f1f7c83c59a16393724fbd8a29ddecb
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
src/backend/catalog/pg_publication.c
src/backend/catalog/system_views.sql
src/backend/replication/pgoutput/pgoutput.c
src/include/catalog/catversion.h
src/test/regress/expected/rules.out
src/test/subscription/t/031_column_list.pl