From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: why can't a table be part of the same publication as its schema
Date: Thu, 8 Sep 2022 13:36:07 +0200
Message-ID: <2729c9e2-9aac-8cda-f2f4-34f2bcc18f4e@enterprisedb.com> (raw)
Apparently, you can't add a table to a publication if its schema is
already part of the publication (and vice versa), e.g.,
=# alter publication p1 add table s1.t1;
ERROR: 22023: cannot add relation "s1.t1" to publication
DETAIL: Table's schema "s1" is already part of the publication or part
of the specified schema list.
Is there a reason for this? It looks a bit like a misfeature to me. It
constrains how you can move your tables around between schemas, based on
how somewhere else a publication has been constructed.
It seems to me that it shouldn't be difficult to handle the case that a
table is part of the publication via two different routes. (We must
already handle that since a subscription can use more than one publication.)
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: peter.eisentraut@enterprisedb.com
Subject: Re: why can't a table be part of the same publication as its schema
In-Reply-To: <2729c9e2-9aac-8cda-f2f4-34f2bcc18f4e@enterprisedb.com>
* 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