pgsql: Improve subscriber's error message for wrong publication relkind

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve subscriber's error message for wrong publication relkind
Date: 2022-02-15 17:21:40
Message-ID: E1nK1WG-0008FA-Tn@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve subscriber's error message for wrong publication relkind.

Pre-v13 versions only support logical replication from plain tables,
while v13 and later also allow partitioned tables to be published.
If you tried to subscribe an older server to such a publication,
you got "table XXX not found on publisher", which is pretty
unhelpful/confusing. Arrange to deliver a more on-point error
message. As commit c314c147c did in v13, remove the relkind check
from the query WHERE clause altogether, so that "not there"
is distinguishable from "wrong relkind".

Per report from Radoslav Nedyalkov. Patch v10-v12.

Discussion: https://postgr.es/m/2952568.1644876730@sss.pgh.pa.us

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/17a8c4c3a274e2c04bf5f564f20398deba53cd55

Modified Files
--------------
src/backend/replication/logical/tablesync.c | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2022-02-15 17:57:50 pgsql: Reject change of output-column collation in CREATE OR REPLACE VI
Previous Message Andres Freund 2022-02-15 15:52:30 Re: pgsql: Remove IS_AF_UNIX macro