Improve subscriber's error message for wrong publication relkind.
authorTom Lane <[email protected]>
Tue, 15 Feb 2022 17:21:28 +0000 (12:21 -0500)
committerTom Lane <[email protected]>
Tue, 15 Feb 2022 17:21:28 +0000 (12:21 -0500)
commit17a8c4c3a274e2c04bf5f564f20398deba53cd55
treebee03d11c8f27bd1e65164c7d55ddafe8e9167f4
parentb5e060473273b7ef95ec919aee0c934e659dd63e
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
src/backend/replication/logical/tablesync.c