From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
Cc: | Joe Conway <mail(at)joeconway(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jim Nasby <jim(at)nasby(dot)net>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Jürgen Strobel <juergen+pg(at)strobel(dot)info>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump without explicit table locking |
Date: | 2014-03-18 00:55:39 |
Message-ID: | CAMkU=1xox5YcFOh5P_hNzxcNeVpGTu8N3ii6hfqGCdTFB5wBSA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Mar 17, 2014 at 5:48 PM, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 03/18/2014 07:20 AM, Joe Conway wrote:
> > On 03/17/2014 04:15 PM, Tom Lane wrote:
> >> Jim Nasby <jim(at)nasby(dot)net> writes:
> >>> On 3/17/14, 8:47 AM, Tom Lane wrote:
> >>>> (Note that this is only one of assorted O(N^2) behaviors in
> >>>> older versions of pg_dump; we've gradually stamped them out
> >>>> over time.)
> >
> >>> On that note, it's recommended that when you are taking a
> >>> backup to restore into a newer version of Postgres you create
> >>> the dump using the NEWER version of pg_dump, not the old one.
> >
> >> Right. IIRC, the OP said he *did* use a recent pg_dump ... but
> >> this particular issue got fixed server-side, so the new pg_dump
> >> didn't help against an 8.1 server :-(
> >
> > Exactly. I backported the patch from 9.3 to 8.4 and saw a
> > schema-only dump time go from <give-up-and-kill-it-after-5-days> to
> > 1 hour. This was for a database with about 500k tables.
>
> I wonder if doing large batches of
>
> LOCK TABLE table1, table2, table3, ...
>
> would help, instead of doing individual statements?
>
If I recall correctly, someone did submit a patch to do that. It helped
when dumping schema only, but not much when dumping data.
Cheers,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2014-03-18 01:24:26 | commit fest 2014-01 closed |
Previous Message | Josh Berkus | 2014-03-18 00:49:32 | Wiki Page Draft for upcoming release |