Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, May 24, 2012 at 4:46 PM, Merlin Moncure <mmoncure@gmail.com> wrote:
>> We don't get to skip wal of course, but we should be able to use a
>> bulk insert strategy, especially if there was some way of predicting
>> that a large number of tuples were going to be inserted. �I'm
>> wondering though of contention on the free list is in fact the OP's
>> problem.
> Not sure. It might be some other LWLock, but it's hard to tell which
> one from the information provided.
Yeah. It seems quite plausible that Robert's select-only benchmark might
be mainly tripping over the freelist lock, but I'm less convinced about
something that's doing INSERT/SELECT, and therefore is also doing a lot
of WAL activity, index insertions, etc. I'd want to see some
instrumentation results before assuming we know where the bottleneck is
there.
regards, tom lane