On Mon, 16 Dec 2024 at 12:05, vignesh C <vignes...@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