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

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Hartmut Goebel <h(dot)goebel(at)goebel-consult(dot)de>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Kevin Grittner <kevin(dot)grittner(at)wicourts(dot)gov>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading
Date: 2010-06-10 15:56:31
Message-ID: 20100610155631.GF21875@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> > Much easier to do a schema-only dump, edit that, and dump data separately.
>
> 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2010-06-10 15:58:15 Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading
Previous Message Tom Lane 2010-06-10 15:48:53 Re: Beta 2 build issue