Re: [Testperf-general] Re: ExclusiveLock

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: josh(at)agliodbs(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org, Simon Riggs <simon(at)2ndquadrant(dot)com>, testperf-general(at)pgfoundry(dot)org
Subject: Re: [Testperf-general] Re: ExclusiveLock
Date: 2004-11-18 22:55:22
Message-ID: 20948.1100818522@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)com> writes:
>> The main problem on INSERTs is that it is usually the same few pages:
>> the lead data block and the lead index block. There are ways of
>> spreading the load out across an index, but I'm not sure what happens on
>> the leading edge of the data relation, but I think it hits the same
>> block each time.

> I actually have several test cases for this, can you give me a trace or
> profile suggestion that would show if this is happening?

If it is a problem, the LockBuffer calls in RelationGetBufferForTuple
would be the places showing contention delays.

It could also be that the contention is for the WALInsertLock, ie, the
right to stuff a WAL record into the shared buffers. This effect would
be the same even if you were inserting into N separate tables.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2004-11-18 22:55:49 Re: OpenBSD/Sparc status
Previous Message Tom Lane 2004-11-18 22:51:07 Re: [Testperf-general] Re: ExclusiveLock