Re: pg_restore --no-post-data and --post-data-only - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_restore --no-post-data and --post-data-only
Date
Msg-id 19777.1323275481@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_restore --no-post-data and --post-data-only  (Josh Berkus <josh@agliodbs.com>)
Responses Re: pg_restore --no-post-data and --post-data-only  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
>>> Note that this feature has the odd effect that some constraints are loaded at the same time as the tables and some
areloaded with the post-data.  This is consistent with how text-mode pg_dump has always worked, but will seem odd to
theuser.  This also raises the possibility of a future pg_dump/pg_restore optimization.
 

>> That does seem odd.  Why do we do it that way?

> Beats me.

Performance, mostly --- we prefer to apply checks during the original
data load if possible, but for indexes and FK constraints it's faster to
apply them later.  Also, we can separate constraints from the original
table declaration if it's necessary to break a reference circularity.
This isn't something that would be wise to whack around.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: documentation issue - extensions
Next
From: Scott Mead
Date:
Subject: Re: IDLE in transaction introspection