Repository navigation
Added
- Schema options
--schema-name,--schema-mask,--exclude-schema-name,--exclude-schema-maskin all dump and restore modes, and the same fields in REST API: keep or leave out whole schemas, with structure and data - Dump check: it stops before
pg_dumpwhen a kept table still needs a type or a parent table from an excluded schema - Restore check: it stops before data loading when the target has no table for some data of the dump
--allow-fdw-credentialsfor dump and--keep-fdw-user-mappingsfor restore, and the same fields in REST API:allow_fdw_credentials,keep_fdw_user_mappings- Security page in the documentation: what pg_anon checks in a dump and what you must review yourself
Updated
- Breaking: dump stops with
CREDENTIALS_LEAKwhen the role can see the options of an FDW user mapping, which may hold passwords of remote servers. Use--allow-fdw-credentialsto dump anyway - Breaking:
dictionary_excludeleaves out only data, also withtable_mask: "*". The tables stay in the dump, but empty. To leave out a whole schema, use--exclude-schema-name - Restore removes FDW
USER MAPPINGentries by default - Dump leaves out subscriptions (pg_dump 10+) and statistics (pg_dump 18+), and warns about foreign servers and user functions or triggers
- Foreign keys to tables without data are restored as
NOT VALID, and the log lists them with the command to validate them later - A schema excluded on restore takes with it the foreign keys, views and event triggers of other schemas that refer to it
--pg-dump-optionsand--pg-restore-optionsare passed "at your own risk": they change only the structure, not the data.sync-data-restorewarns that they have no effect there- Extensions are created in their source schema, with the source version and in dependency order
- Data of extension tables is not dumped, as the extension fills them itself. Configuration tables (
pg_extension_config_dump) are still dumped - Schemas that belong to extensions, are created by
CREATE EXTENSIONand are not affected by schema options
Fixed
- Restore of a dump made by an unprivileged role failed with
missing required option "user" - Restore failed when the schema of an extension was excluded from the dump
- Rows of extension tables clashed with the rows that
CREATE EXTENSIONinserts --clean-dbstopped with "extra tables" on dumps with partitioned tables or with tables without data- Partial restore of a full dump could not create a schema with a space in its name
- Schemas like
pgq, with names that start withpgbut notpg_, were treated as system schemas in some checks