Notes
+
+ If your installation has any local additions to the template1 database,
+ be careful to restore the output of pg_dump into a
+ truly empty database; otherwise you are likely to get errors due to
+ duplicate definitions of the added objects. To make an empty database
+ without any local additions, copy from template0 not template1,
+ for example:
+CREATE DATABASE foo WITH TEMPLATE = template0;
+
+
+
- pg_dump has a few limitations.
+ pg_dump has a few limitations:
-
+
Notes
+ If your installation has any local additions to the template1 database,
+ be careful to load the output of pg_restore into a
+ truly empty database; otherwise you are likely to get errors due to
+ duplicate definitions of the added objects. To make an empty database
+ without any local additions, copy from template0 not template1,
+ for example:
+CREATE DATABASE foo WITH TEMPLATE = template0;
+
+
+
The limitations of pg_restore are detailed below.
- When restoring data to a table, pg_restore emits queries
+ When restoring data to a pre-existing table, pg_restore emits queries
to disable triggers on user tables before inserting the data then emits queries to
re-enable them after the data has been inserted. If the restore is stopped in the
middle, the system catalogs may be left in the wrong state.
See the documentation for details on
- limitation of pg_dump.
+ limitations of pg_dump.