Have --skip-extensions also skip pre-existing schemas on the target. (#341)
* Have --skip-extensions also skip pre-existing schemas on the target.
When skipping extensions we assume that another process did take care of
creating the needed extensions on the target instance, such as e.g. the
`pgcopydb copy extensions` command.
The "CREATE EXTENSION" command may create a schema, and we need to skip
schemas that such a command would have created on the target already. It is
not always possible to track schemas created by extensions, some extension
scripts are going out of their way to make sure of that:
DO $$
CREATE SCHEMA tiger_data;
$$;
So we track all the schemas that already exist on the target database and
skip creating them when the --skip-extensions command is used.
* Fix copydb_schema_already_exists to follow API, assorted fixes.
* Update documentation, improve error reporting.
* We don't have support for pg_partman and postgis_tiger_geocoder yet.
These extensions require superuser for dump&restore.
parent
9fcbc3ae
Please register or sign in to comment