From 1a7376acef244603fee84a199d7a28270b865e7f Mon Sep 17 00:00:00 2001 From: Florents Tselai Date: Thu, 26 Sep 2024 01:24:35 +0300 Subject: [PATCH v1] Note on -e, -t, -n --- doc/src/sgml/ref/pg_dump.sgml | 41 +++++++++----------------------- doc/src/sgml/ref/pg_restore.sgml | 21 ++++++++-------- 2 files changed, 22 insertions(+), 40 deletions(-) diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index ffc29b04fb..c8971cd30e 100644 --- a/doc/src/sgml/ref/pg_dump.sgml +++ b/doc/src/sgml/ref/pg_dump.sgml @@ -247,16 +247,6 @@ PostgreSQL documentation dump if its extension is specified by . - - - When is specified, - pg_dump makes no attempt to dump any other - database objects that the selected extension(s) might depend upon. - Therefore, there is no guarantee that the results of a - specific-extension dump can be successfully restored by themselves - into a clean database. - - @@ -431,16 +421,6 @@ PostgreSQL documentation below. - - - When is specified, pg_dump - makes no attempt to dump any other database objects that the selected - schema(s) might depend upon. Therefore, there is no guarantee - that the results of a specific-schema dump can be successfully - restored by themselves into a clean database. - - - Non-schema objects such as large objects are not dumped when is @@ -581,16 +561,6 @@ PostgreSQL documentation be dumped. - - - When is specified, pg_dump - makes no attempt to dump any other database objects that the selected - table(s) might depend upon. Therefore, there is no guarantee - that the results of a specific-table dump can be successfully - restored by themselves into a clean database. - - - @@ -1589,6 +1559,17 @@ CREATE DATABASE foo WITH TEMPLATE template0; catalogs might be left in the wrong state. + + When , or is specified, + pg_dump makes no attempt to dump any other + database objects that the selected extension(s) might depend upon. + Therefore, there is no guarantee that the results of a + specific-table or specific-schema dump can be successfully restored by themselves + into a clean database. + For in particular, note that the referred extension + must be installed (i.e. its shared object) separately, before it can be restored. + + The dump file produced by pg_dump does not contain the statistics used by the optimizer to make diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml index b8b27e1719..00132f3000 100644 --- a/doc/src/sgml/ref/pg_restore.sgml +++ b/doc/src/sgml/ref/pg_restore.sgml @@ -519,16 +519,6 @@ PostgreSQL documentation specify table(s) in a particular schema. - - - When is specified, pg_restore - makes no attempt to restore any other database objects that the - selected table(s) might depend upon. Therefore, there is no - guarantee that a specific-table restore into a clean database will - succeed. - - - This flag does not behave identically to the @@ -995,6 +985,17 @@ PostgreSQL documentation Notes + + When or is specified, + pg_restore + makes no attempt to restore any other database objects that the + selected table(s) or schema(s) might depend upon. + Therefore, there is no guarantee that a specific-table restore into a clean database will succeed. + For example, if pg_restore -t A is requested, + and A has foreign key constraints to table B, + B should have been restored prior to that. + + If your installation has any local additions to the template1 database, be careful to load the output of -- 2.39.5 (Apple Git-154)