Re: Added schema level support for publication.
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Greg Nancarrow <gregn4422@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>, vignesh C <vignesh21@gmail.com>, "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>, "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>,
Tom Lane <tgl@sss.pgh.pa.us>, Peter Smith <smithpb2250@gmail.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-11-01T10:28:20Z
Lists: pgsql-hackers
On Mon, Nov 1, 2021 at 2:38 PM Greg Nancarrow <gregn4422@gmail.com> wrote: > > On Mon, Nov 1, 2021 at 5:07 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > > > I haven't followed the discussion on pg_publication_objects view but > > what is the primary use case of this view? If it's to list all tables > > published in a publication (e.g, "select * from pg_publication_objects > > where pubname = 'pub1'), pg_publication_objects view lacks the > > information of FOR ALL TABLES publications. And probably we can use > > pg_publication_tables instead. On the other hand, if it's to list all > > tables published in FOR ALL TABLES IN SCHEMA publications (e.g., > > "select * from pg_publication_object where objtype = 'schema'), the > > view doesn't show tables published in such publications. > > Both the problems mentioned can be fixed if we follow the change suggested by me in one of the emails above [1]. > > I think that Amit originally suggested to have a view that provides > information about the objects in each publication (like table, tables > in schema, sequence ...). > Right and I think as you also mentioned in your previous email it can save the effort of users if they want to know all the objects published via a publication. I am just not sure if it is worth adding such a view or we leave it to users to find that information via querying individual views or system tables for objects. [1] - https://www.postgresql.org/message-id/CAA4eK1%2BL2-6JQ174sVfE3_K%3DmjTKJ2A8-z%2B_pExDHhqdBJvb5Q%40mail.gmail.com -- With Regards, Amit Kapila.
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