From: Jeff Frost <jeff@pgexperts.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: 9.1.3 backends getting stuck in 'startup'
Date: Fri, 27 Apr 2012 17:45:43 -0700
Message-ID: <4F9B3DB7.5020308@pgexperts.com> (raw)
In-Reply-To: <9495.1335573058@sss.pgh.pa.us>
References: <4F9AC452.3050102@pgexperts.com>
<23016.1335546879@sss.pgh.pa.us>
<4F9AEB6A.9060706@pgexperts.com>
<4F9AEFFE.6090600@pgexperts.com>
<25630.1335554264@sss.pgh.pa.us>
<4F9AF244.80203@pgexperts.com>
<25861.1335554831@sss.pgh.pa.us>
<4F9AF746.9060202@pgexperts.com>
<4F9B0347.8020302@pgexperts.com>
<9495.1335573058@sss.pgh.pa.us>
On 04/27/12 17:30, Tom Lane wrote:
> Jeff Frost <jeff@pgexperts.com> writes:
>> and I've got 81 more that do not contain bufmgr.c and are also not block on
>> LWLockAcquire.
> Hm ... no smoking gun in what you showed so far. I also took another
> look through 9.1 bufmgr.c, and I'm darned if I can see any code path
> there that holds a buffer mapping lock for any long interval.
>
> One possible theory is that you're using pg_buffercache_pages(), which
> does take all those locks. It tries its best to not hold them long,
> but with a sufficiently large buffer cache there could be an issue.
> (What is the shared_buffers setting on this installation, anyway?)
>
Tom, what does the startup code path read? The list of relations or
something? Just wondering what the contention would be.
Oh, good idea! Looks like pg_buffercache is installed in this DB. Customer
reports that it has been installed since the server has existed (and on the
previous server) but is not currently being used, though the issue with the
hanging startups did not start until this morning. Could it still cause
contention even if it's not being executed?
shared_buffers is 8GB on this machine which has 128GB of RAM.
It seems the pooling software that's being used has a max connection lifetime
of 1hr which is what makes this so painful.
--
Jeff Frost <jeff@pgexperts.com>
CTO, PostgreSQL Experts, Inc.
Phone: 1-888-PG-EXPRT x506
FAX: 415-762-5122
http://www.pgexperts.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: jeff@pgexperts.com, tgl@sss.pgh.pa.us
Subject: Re: 9.1.3 backends getting stuck in 'startup'
In-Reply-To: <4F9B3DB7.5020308@pgexperts.com>
References: <4F9AC452.3050102@pgexperts.com> <23016.1335546879@sss.pgh.pa.us> <4F9AEB6A.9060706@pgexperts.com> <4F9AEFFE.6090600@pgexperts.com> <25630.1335554264@sss.pgh.pa.us> <4F9AF244.80203@pgexperts.com> <25861.1335554831@sss.pgh.pa.us> <4F9AF746.9060202@pgexperts.com> <4F9B0347.8020302@pgexperts.com> <9495.1335573058@sss.pgh.pa.us> <4F9B3DB7.5020308@pgexperts.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox