Re: docs: warn about post-data-only schema dumps with parallel restore. - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: docs: warn about post-data-only schema dumps with parallel restore.
Date
Msg-id CAKFQuwaL5_7wmJ5nwXDn-Vc=vivOP6AB9U2Qyg5TgnzJ1pKNFw@mail.gmail.com
Whole thread
In response to Re: docs: warn about post-data-only schema dumps with parallel restore.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: docs: warn about post-data-only schema dumps with parallel restore.
List pgsql-hackers
On Tuesday, March 31, 2026, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> But how about adding something like the following to the pg_dump notes?  We
> already have the corresponding link going to pg_dump in the pg_restore
> notes.

> "If producing a non-plaint-text format output see also the pg_restore
> documentation for details on how the restore process uses the different
> sections."

Hmm, I think we could be a bit more definite than that.  What do you
think of this advice:

  <para>
   When creating an archive (non-text) output file, it is advisable not to
   restrict the set of database objects dumped, but instead plan to apply
   any desired object filtering when reading the archive
   with <application>pg_restore</application>.  This will preserve
   flexibility and possibly avoid problems at restore time; for details
   see the <xref linkend="app-pgrestore"/> documentation.  However,
   omitting table data (<option>--no-data</option>) or large objects
   (<option>--no-large-objects</option>) does not have any surprising
   consequences.
  </para>


I’m against including that final sentence.  The rest seems ok but I’ suggest going with an explicit mention that “—no-schema is risky” (or otherwise omitting the entire section)

I have a nagging suspicion we could be a bit more precise; e.g., it’s advisable to include the schema objects for the data that is being exported only, not the entire schema always.  But we already mention that dealing in subsets can introduce dependency issues so people have already been given the alert there.  But data/no-schema seems like it should just work and this just needs to warn them that it may not.

David J.

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pg_get__*_ddl consolidation
Next
From: Tom Lane
Date:
Subject: Re: docs: warn about post-data-only schema dumps with parallel restore.