Re: Added schema level support for publication.
Greg Nancarrow <gregn4422@gmail.com>
From: Greg Nancarrow <gregn4422@gmail.com>
To: "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, vignesh C <vignesh21@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>,
Tom Lane <tgl@sss.pgh.pa.us>, Peter Smith <smithpb2250@gmail.com>,
"tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>, Ajin Cherian <itsajin@gmail.com>, Rahila Syed <rahilasyed90@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Date: 2021-09-23T03:05:59Z
Lists: pgsql-hackers
On Wed, Sep 22, 2021 at 9:33 PM houzj.fnst@fujitsu.com <houzj.fnst@fujitsu.com> wrote: > > > > > How do you suggest changing it? > > Personally, I think we'd better move the code about changing publication's > tablelist into AlterPublicationTables and the code about changing publication's > schemalist into AlterPublicationSchemas. It's similar to what the v29-patchset > did, the difference is the SET action, I suggest we drop all the tables in > function AlterPublicationTables when user only set schemas and drop all the > schema in AlterPublicationSchemas when user only set tables. In this approach, > we can keep schema and relation code separate and don't need to worry > about the locking order. > > Attach a top-up patch which refactor the code like above. > Thoughts ? > Sounds like a good idea. Is it possible to incorporate the existing CheckPublicationAlterTables() and CheckPublicationAlterSchemas() functions into your suggested update? I think it might tidy up the error-checking a bit. Regards, Greg Nancarrow Fujitsu Australia
Commits
-
Include schema/table publications even with exclude options in dump.
- 4aa6fa3cd0a2 18.0 landed
-
Rename some enums to use TABLE instead of REL.
- b3812d0b9bcf 15.0 landed
-
Add tap tests for the schema publications.
- 6b0f6f79eef2 15.0 landed
-
Allow publishing the tables of schema.
- 5a2832465fd8 15.0 landed
-
In pg_dump, use simplehash.h to look up dumpable objects by OID.
- 92316a4582a5 15.0 cited