From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Magnus Hagander <magnus(at)hagander(dot)net> |
Subject: | Re: Further pg_upgrade analysis for many tables |
Date: | 2012-11-12 21:54:28 |
Message-ID: | CAMkU=1z2mFVRPiPrhqLD+LB3uShKp_X+Eg_8CUnwERoiJOjrqg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Nov 9, 2012 at 10:50 AM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
> On Thu, Nov 8, 2012 at 9:50 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Jeff Janes <jeff(dot)janes(at)gmail(dot)com> writes:
>>> Are sure the server you are dumping out of is head?
>>
>> I experimented a bit with dumping/restoring 16000 tables matching
>> Bruce's test case (ie, one serial column apiece). The pg_dump profile
>> seems fairly flat, without any easy optimization targets. But
>> restoring the dump script shows a rather interesting backend profile:
>>
>> samples % image name symbol name
>> 30861 39.6289 postgres AtEOXact_RelationCache
>> 9911 12.7268 postgres hash_seq_search
> ...
>>
>> There are at least three ways we could whack that mole:
>>
>> * Run the psql script in --single-transaction mode, as I was mumbling
>> about the other day. If we were doing AtEOXact_RelationCache only once,
>> rather than once per CREATE TABLE statement, it wouldn't be a problem.
>> Easy but has only a narrow scope of applicability.
>
> That is effective when loading into 9.3 (assuming you make
> max_locks_per_transaction large enough). But when loading into <9.3,
> using --single-transaction will evoke the quadratic behavior in the
> resource owner/lock table and make things worse rather than better.
Using --single-transaction gets around the AtEOXact_RelationCache
quadratic, but it activates another quadratic behavior, this one in
"get_tabstat_entry". That is a good trade-off because that one has a
lower constant, but it is still going to bite.
Cheers,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2012-11-12 22:14:57 | vacuumlo - use a cursor |
Previous Message | Simon Riggs | 2012-11-12 21:41:29 | Re: Proof of concept: standalone backend with full FE/BE protocol |