Re: Added schema level support for publication. - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Added schema level support for publication.
Date
Msg-id CAA4eK1+aLzPpy36iKOspYksaUG6nCa7VqOyk7=36uaeBZHYDFQ@mail.gmail.com
Whole thread Raw
In response to RE: Added schema level support for publication.  ("houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>)
Responses RE: Added schema level support for publication.
List pgsql-hackers
On Wed, Sep 22, 2021 at 5:03 PM houzj.fnst@fujitsu.com
<houzj.fnst@fujitsu.com> wrote:
>
> 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.
>

Good suggestion. I think it would still be better if we can move the
checks related to superuser and puballtables into a separate function
that gets called before taking a lock on publication.

-- 
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: wenjing
Date:
Subject: Re: [Proposal] Global temporary tables
Next
From: Sadhuprasad Patro
Date:
Subject: Re: Next Steps with Hash Indexes