Re: Extensions not dumped when --schema is used

Asif Rehman <asifr.rehman@gmail.com>

From: Asif Rehman <asifr.rehman@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Cc: Guillaume Lelarge <guillaume@lelarge.info>
Date: 2021-02-03T17:32:19Z
Lists: pgsql-hackers
The following review has been posted through the commitfest application:
make installcheck-world:  tested, passed
Implements feature:       tested, passed
Spec compliant:           not tested
Documentation:            not tested

The patch applies cleanly and looks fine to me. However consider this scenario.

- CREATE SCHEMA foo;
- CREATE EXTENSION file_fdw WITH SCHEMA foo;
- pg_dump  --file=/tmp/test.sql --exclude-schema=foo postgres

This will still include the extension 'file_fdw' in the backup script. Shouldn't it be excluded as well?

The new status of this patch is: Waiting on Author

Commits

  1. Tweak behavior of pg_dump --extension with configuration tables

  2. Remove duplicated --no-sync switches in new tests of test_pg_dump

  3. Add support for --extension in pg_dump