Skip site navigation (1) Skip section navigation (2)

Re: pg_dump --split patch

From: Joel Jacobson <joel(at)gluefinance(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, dmitry(at)koterov(dot)ru, Aidan Van Dyk <aidan(at)highrise(dot)ca>, Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>, David Wilson <david(dot)t(dot)wilson(at)gmail(dot)com>
Subject: Re: pg_dump --split patch
Date: 2011-01-03 18:50:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
2011/1/3 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> pg_dump from dumping objects in a consistent order ... and once you do
> that, you don't need this patch.
> Yeah, that's exactly it.  I can think of some possible uses for
> splitting up pg_dump output, but frankly "to ease diff-ing" is not
> one of them.  For that problem, it's nothing but a crude kluge that
> only sort-of helps.  If we're to get anywhere on this, we need a
> better-defined problem statement that everyone can agree is worth
> solving and is well solved with this particular approach.

The problem statement is only partly diffing, I think the two major
other problems with one-single-giant-schema-file is:

1. Automatically version controlling your production database schema
using a file based approach is not possible.
Splitting the schema would mean it's very simple to setup a cronjob
which automatically commits the schema changes every night. You would
be able to follow the changes by simply looking at the vcs log,
instead of grepping the log files and trying to figure out what

2. Splitting is a single option which reduces the need for any other
imaginable exclude/include options, such as "only export these
functions" or "do not export views" etc. Tables are of course the most
common thing you want to include/exclude in a dump, but there are
quite a lot of different object types, however, no single object type
is "important enough" to motivate a new pg_dump option to allow a
exclusion/inclusion option, but I think the sum of the need for such
an option for all object types is greather than the extra complexity
introduced by a patch consisting of only a few lines of code.

Best regards,

Joel Jacobson
Glue Finance

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-01-03 18:50:14
Subject: Re: back branches vs. VS 2008
Previous:From: Robert HaasDate: 2011-01-03 18:34:57
Subject: Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group