Re: [Testperf-general] Re: ExclusiveLock - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [Testperf-general] Re: ExclusiveLock
Date
Msg-id 20948.1100818522@sss.pgh.pa.us
Whole thread Raw
In response to Re: [Testperf-general] Re: ExclusiveLock  (Josh Berkus <josh@agliodbs.com>)
Responses Re: [Testperf-general] Re: ExclusiveLock  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
Josh Berkus <josh@agliodbs.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [Testperf-general] Re: ExclusiveLock
Next
From: Andrew Dunstan
Date:
Subject: Re: OpenBSD/Sparc status