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

From Artur Zakirov
Subject Re: Added schema level support for publication.
Date
Msg-id CAKNkYnyZV5Bz+=y6emiWJ3RfcGoSFTFKp8VwC44_75xKGTztLg@mail.gmail.com
Whole thread Raw
In response to Re: Added schema level support for publication.  (vignesh C <vignesh21@gmail.com>)
Responses Re: Added schema level support for publication.
List pgsql-hackers
On Mon, 16 Dec 2024 at 12:05, vignesh C <vignesh21@gmail.com> wrote:
> I prefer the other approach to remove both the checks in
> getPublicationTables() and getPublicationNamespaces() which also makes
> it consistent with the other case that Amit mentioned at [1].

If I understand your suggestion correctly I think this will break the
"--exclude-schema" option of pg_dump. That change will dump all
mappings between publications and schemas for publications which are
dumped.

That solves the issue with special schemas, but restore will fail if
some schemas were explicitly excluded. pg_dump will include in the
dump ALTER PUBLICATION <pub> ADD TABLES IN SCHEMA <schema> even for
those schemas which are not created during restore.

I think getPublicationNamespaces() should handle both special schemas
and excluded schemas, which can make the code a bit more complex
though.

-- 
Kind regards,
Artur



pgsql-hackers by date:

Previous
From: Nishant Sharma
Date:
Subject: Re: on_error table, saving error info to a table
Next
From: Junwang Zhao
Date:
Subject: Re: SQL Property Graph Queries (SQL/PGQ)