9

I am reading the doc of PG Admin 4 about backup dialog box which uses the pg_dump utility.

In the dump options tab, there is a sub-menu Section with three switches.

One of the switch is named "pre-data" and the doc explains:

Move the switch next to Pre-data to the Yes position to include all data definition items not included in the data or post-data item lists.

I don't understand what is included in:

all data definition items not included in the data or post-data item lists.

What are those "data definition items" included in "pre data"?

Search engines lead me to other Postgresql doc about the pg_dump with exactly the same explanation.

nyluje
  • 3,573
  • 7
  • 37
  • 67
  • This is documented in the manual for `pg_dump`: https://www.postgresql.org/docs/current/static/app-pgdump.html see the part about the `--section` argument –  Oct 11 '17 at 17:10
  • ok in the part` --schema-only` it explains: --section=pre-data and --section=post-data together are similar to --schema-only, that is the kind of info I was looking for. But the part `--section` argument of the "classic" doc has the same content as in the PGadmin 4 doc. – nyluje Oct 11 '17 at 17:56

2 Answers2

12

If you try to make two backups of the same object and using --section=pre-data for the first one and --section=post-data for the second one, you will see that:

pre-data contains all information related to table/schema definition, sequences, owner and settings

post-data contains all the constraints information.

Lucat
  • 2,242
  • 1
  • 30
  • 41
  • 5
    This should be included in official docs. What exists is too nebulous to be useful. Docs do a nice job explaining "post-data", which is indexes, constraints, etc... basically stuff you create after the tables exist. – Matthew Allen Aug 21 '20 at 13:28
-1

In official doc there is the best explanation I found: In the part--schema-only it states that: --section=pre-data and --section=post-data together are similar to --schema-only.

nyluje
  • 3,573
  • 7
  • 37
  • 67