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

Re: Pg_upgrade speed for many tables

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Pg_upgrade speed for many tables
Date: 2012-11-05 21:04:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Mon, Nov  5, 2012 at 10:01:22PM +0100, Magnus Hagander wrote:
> On Mon, Nov 5, 2012 at 9:49 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>     On Mon, Nov  5, 2012 at 03:30:32PM -0500, Tom Lane wrote:
>     > Magnus Hagander <magnus(at)hagander(dot)net> writes:
>     > > On Mon, Nov 5, 2012 at 9:14 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>     > >> BTW, does pg_upgrade run pg_restore in --single-transaction mode?
>     > >> That would probably make synchronous_commit moot, at least for that
>     > >> step.
>     >
>     > > It doesn't use pg_restore at all - it uses the dump from pg_dumpall,
>     which
>     > > you can't reload with pg_restore.
>     >
>     > Sorry, I should've said psql --single-transaction.  Although that isn't
>     > going to work either given the presence of \connect commands in the
>     > script.  I wonder whether pg_dumpall ought to have some sort of "one
>     > transaction per database please" option.
>     pg_dumpall is already doing lots of gymnastics with SQL, and pg_upgrade
>     splits the output file into db/user creation and object creation, so I
>     am hesitant to add anything more in there.
> What about running pg_dump in a loop instead of pg_dumpall?

Well, I could cetainly do pg_dumpall --globals-only, and then I have to
create a pg_dump file for every database, and then add the \connect in
there;  it just seemed easier to use pg_dumpall, though the file split
thing is certainly something I would like to get rid of.

I think I used pg_dumpall because it was an existing tool that I assumed
would be maintained to dump a full cluster.

  Bruce Momjian  <bruce(at)momjian(dot)us>

  + It's impossible for everything to be true. +

In response to

pgsql-hackers by date

Next:From: Jeff JanesDate: 2012-11-05 21:07:45
Subject: Re: Pg_upgrade speed for many tables
Previous:From: Magnus HaganderDate: 2012-11-05 21:01:22
Subject: Re: Pg_upgrade speed for many tables

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