Re: Pg_upgrade speed for many tables - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: Pg_upgrade speed for many tables
Date
Msg-id CAMkU=1ys+=FVMeYy5JT7Z8hD3EkVMYcMw3Z7wvv+BgmFbcMxHQ@mail.gmail.com
Whole thread Raw
In response to Re: Pg_upgrade speed for many tables  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Nov 5, 2012 at 12:14 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Bruce Momjian <bruce@momjian.us> writes:
>> Magnus reported that a customer with a million tables was finding
>> pg_upgrade slow.
>
> You sure there's not an O(N^2) issue in there somewhere?

There certainly will be before he gets to a million, but it probably
doesn't show up yet testing at 2000.

He will probably have to hack pg_dump, as discussed here:

http://archives.postgresql.org/pgsql-performance/2012-09/msg00003.php


>
>> I don't see anything unsafe about having pg_upgrade use
>> synchronous_commit=off.
>
> No objection, but this seems unlikely to be better than linear speedup,
> with a not-terribly-large constant factor.
>
> BTW, does pg_upgrade run pg_restore in --single-transaction mode?
> That would probably make synchronous_commit moot, at least for that
> step.

Doing that might make the sync problem better, but would make the N^2
problem worse if upgrading to <= 9.2 .

Cheers,

Jeff



pgsql-hackers by date:

Previous
From: Palle Girgensohn
Date:
Subject: Re: alter table tablename add column - breaks pl/pgsql function returns tablename
Next
From: Merlin Moncure
Date:
Subject: Re: What are the advantages of not being able to access multiple databases with one connection?