Re: pg_get_publication_tables() output duplicate relid
Amit Langote <amitlangote09@gmail.com>
From: Amit Langote <amitlangote09@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>,
Alvaro Herrera <alvherre@alvh.no-ip.org>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2021-12-07T05:07:56Z
Lists: pgsql-hackers
On Tue, Dec 7, 2021 at 12:45 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > On Mon, Dec 6, 2021 at 8:04 PM Amit Langote <amitlangote09@gmail.com> wrote: > > So IIUC the scenario of concern is when a table to be attached as a > > partition is in a schema that's present in pg_publication_namespace. > > The only way to stop it from being published is to move it to another > > schema that is not published using that publication. > > > > I think I misunderstood how the IN SCHEMA feature works. > > Specifically, I didn't know that one can add a partitioned table to > > the same publication (or any table other than those in a particular > > schema for that matter). Then the attached partition would still be > > present in the publication by way of being part of the schema that is > > present in the publication, along with the partitioned table that is > > added separately. > > Right. > > > Yes, my proposal in its current form can't prevent that kind of duplication. > > I am not sure how to proceed here. I feel it is better to go ahead > with the fix Hou-san proposed here and in another email [1] to fix the > know issues, especially because the issue discussed in [1] needs to be > back-patched. > > We can evaluate your proposal separately for HEAD. What > do you think? Yeah, maybe. Though given the direction that the row-filters patch set is taking in allowing to definw filters on the individual partitions, I am not sure if I should be pushing the approach to disallow partitions from being added to publications explicitly alongside their parent tables. I'll try to take a look at that thread to be sure if that's actually the case. Also, for the purposes of the problems that Greg and Hou-san have discovered, I have no objection with applying Hou-san's patches. Those seem better for the back-patching anyway. Thank you. -- Amit Langote EDB: http://www.enterprisedb.com
Commits
-
Improve invalidation handling in pgoutput.c.
- 7f481b8d3884 15.0 cited
-
De-duplicate the result of pg_publication_tables view.
- a61bff2bf479 15.0 landed
-
Doc: Add "Attach Partition" limitation during logical replication.
- 64e8456bbde1 13.6 landed
- 4b8eec716a52 14.2 landed
- eb7828f54a44 15.0 landed