Re: Added schema level support for publication.
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>,
Masahiko Sawada <sawada.mshk@gmail.com>, "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>,
Greg Nancarrow <gregn4422@gmail.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-10-19T15:44:16Z
Lists: pgsql-hackers
On Tue, Oct 19, 2021 at 11:23 AM tanghy.fnst@fujitsu.com <tanghy.fnst@fujitsu.com> wrote: > > On Tuesday, October 19, 2021 12:57 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > > > On Tue, Oct 19, 2021 at 9:15 AM tanghy.fnst@fujitsu.com > > <tanghy.fnst@fujitsu.com> wrote: > > > > > > On Monday, October 18, 2021 8:23 PM vignesh C <vignesh21@gmail.com> > > wrote: > > > > > > > > Thanks for the comments, the attached v42 patch has the fixes for the same. > > > > > > Thanks for your new patch. > > > > > > I tried your patch and found that the permission check for superuser didn't work. > > > > > > For example: > > > postgres=# create role r1; > > > CREATE ROLE > > > postgres=# grant all privileges on database postgres to r1; > > > GRANT > > > postgres=# set role r1; > > > SET > > > postgres=> create schema s1; > > > CREATE SCHEMA > > > postgres=> create publication pub for all tables in schema s1; > > > CREATE PUBLICATION > > > > > > Role r1 is not superuser, but this role could create publication for all tables in > > schema > > > successfully, I think it is related the following change. List schemaidlist was > > > not assigned yet. I think we should check it later. > > > > > > > It seems this got broken in yesterday's patch version. Do you think it > > is a good idea to add a test for this case? > > > > Agreed. Thanks for your suggestion. > > I tried to add this test to publication.sql, a patch diff file for this test is attached. Thanks for the test case, I have merged it to the v43 version patch attached at [1]. [1] - https://www.postgresql.org/message-id/CALDaNm2pJ49wAv%3DgEZrAP5%3D_apAzv_rgK3zjX-wfwCY%2BWWfT9w%40mail.gmail.com Regards, Vignesh
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