Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 922
nyluje Avatar asked Oct 11 '17 16:10

nyluje


1 Answers

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.

like image 173
Luke Avatar answered Oct 08 '22 20:10

Luke