pg_dump, dump options "pre-data", What are the "data definition items" included in "pre_data"?
Asked Answered
M

2

15

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.

Margarita answered 11/10, 2017 at 16:7 Comment(2)
This is documented in the manual for pg_dump: postgresql.org/docs/current/static/app-pgdump.html see the part about the --section argumentLatoria
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.Margarita
M
0

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.

Margarita answered 14/10, 2017 at 16:47 Comment(0)
C
16

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.

Constructive answered 18/6, 2019 at 11:17 Comment(1)
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.Ramey
M
0

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.

Margarita answered 14/10, 2017 at 16:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.