Re: Added schema level support for publication.

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Mark Dilger <mark.dilger@enterprisedb.com>
Cc: vignesh C <vignesh21@gmail.com>, "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>, Greg Nancarrow <gregn4422@gmail.com>, Ajin Cherian <itsajin@gmail.com>, "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>, Rahila Syed <rahilasyed90@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Date: 2021-08-12T04:55:20Z
Lists: pgsql-hackers
On Wed, Aug 11, 2021 at 7:45 PM Mark Dilger
<mark.dilger@enterprisedb.com> wrote:
>
> > On Aug 10, 2021, at 10:59 PM, vignesh C <vignesh21@gmail.com> wrote:
> >
> > Also, the behavior of "Alter publication drop table" for which the
> > user is not the owner is successful, Is this behavior correct?
>
> I think that dropping a table from a publication should be allowed for the publication owner, without regard to the owner of the table.
> Adding a table to a publication is different, as it exposes the contents of the table.
>
..
..
>
> Clearly user2 cannot modify pub1, not even with respect to user2's own table.  user1 can modify its own publication except for adding someone else's table.  This seems correct to me.
>

That looks reasonable to me as well and I think we should follow the
same for the schema.

-- 
With Regards,
Amit Kapila.



Commits

  1. Include schema/table publications even with exclude options in dump.

  2. Rename some enums to use TABLE instead of REL.

  3. Add tap tests for the schema publications.

  4. Allow publishing the tables of schema.

  5. In pg_dump, use simplehash.h to look up dumpable objects by OID.