Skip to content

1.12.0

Latest

Choose a tag to compare

@github-actions github-actions released this 25 Sep 12:41
1456118

Added

  • Schema options --schema-name, --schema-mask, --exclude-schema-name, --exclude-schema-mask in 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_dump when 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-credentials for dump and --keep-fdw-user-mappings for 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_LEAK when the role can see the options of an FDW user mapping, which may hold passwords of remote servers. Use --allow-fdw-credentials to dump anyway
  • Breaking: dictionary_exclude leaves out only data, also with table_mask: "*". The tables stay in the dump, but empty. To leave out a whole schema, use --exclude-schema-name
  • Restore removes FDW USER MAPPING entries 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-options and --pg-restore-options are passed "at your own risk": they change only the structure, not the data. sync-data-restore warns 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 EXTENSION and 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 EXTENSION inserts
  • --clean-db stopped 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 with pg but not pg_, were treated as system schemas in some checks