Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading - Mailing list pgsql-bugs

From Stephen Frost
Subject Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading
Date
Msg-id 20100610155631.GF21875@tamriel.snowman.net
Whole thread Raw
In response to Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading
List pgsql-bugs
* 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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Beta 2 build issue
Next
From: Stephen Frost
Date:
Subject: Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading