* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> > Much easier to do a schema-only dump, edit that, and dump data separate=
ly.
>=20
> That gets you out of the huge-file-to-edit problem, but the performance
> costs of restoring a separate-data dump are a pretty serious
> disadvantage. We really should do something about that.
Big +1 on that.. I *still* do it by hand much of the time these days
(manually hacking out the CREATE TABLE step from the ALTER TABLE; CREATE
INDEX piece). We took some steps towards improving that using custom
dump formats, iirc, but the patch Simon (iirc) for adding options to
pg_dump to have it split things out for the SQL-style dump never did get
in (think there were dependency issues and whatnot, and I have to admit
that it didn't really have the best UI/parameters).
Perhaps we should have a 'multi-file' option with a 'base-file-name'
parameter which then generates:
pre-data DDL
data
post-data DDL
psql script to run them in order (\i-style)
?
Just my 2c.
Thanks,
Stephen