statistics.
+
+
+
Some Notes About pg_dump>
+
+ Dump scripts generated by
pg_dump> automatically apply
+ several, but not all, of the above guidelines. To reload a
+
pg_dump> dump as quickly as possible, you need to
+ do a few extra things manually. (Note that these points apply while
+ restoring> a dump, not while creating> it.
+ The same points apply when using
pg_restore> to load
+ from a
pg_dump> archive file.)
+
+
+ By default,
pg_dump> uses COPY>, and when
+ it is generating a complete schema-and-data dump, it is careful to
+ load data before creating indexes and foreign keys. So in this case
+ the first several guidelines are handled automatically. What is left
+ for you to do is to set appropriate (i.e., larger than normal) values
+ for maintenance_work_mem and
+ checkpoint_segments before loading the dump script,
+ and then to run ANALYZE> afterwards.
+
+
+ A data-only dump will still use COPY>, but it does not
+ drop or recreate indexes, and it does not normally touch foreign
+ keys.
+
+
+ You can get the effect of disabling foreign keys by using
+ the
+ that eliminates, rather than just postponing, foreign key
+ validation, and so it is possible to insert bad data if you use it.
+
+
+
+ So when loading a data-only dump, it is up to you to drop and recreate
+ indexes and foreign keys if you wish to use those techniques.
+ It's still useful to increase checkpoint_segments
+ while loading the data, but don't bother increasing
+ maintenance_work_mem; rather, you'd do that while
+ manually recreating indexes and foreign keys afterwards.
+ And don't forget to ANALYZE> when you're done.
+
+