Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 8A39611DBC5 for ; Fri, 27 Apr 2012 21:46:01 -0300 (ADT) Received: from smtp.01.com ([199.36.142.181]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SNvnS-0005hc-8m for pgsql-bugs@postgresql.org; Sat, 28 Apr 2012 00:46:00 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 420FC4F60A0; Fri, 27 Apr 2012 19:45:45 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kKtkq2IXhebW; Fri, 27 Apr 2012 19:45:45 -0500 (CDT) Received: from smtp.01.com (localhost.localdomain [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 149E44F60E0; Fri, 27 Apr 2012 19:45:45 -0500 (CDT) Received: from [10.10.10.5] (8.202-62-69.ftth.swbr.surewest.net [69.62.202.8]) by smtp-out-2.01.com (Postfix) with ESMTPSA id D53674F60A0; Fri, 27 Apr 2012 19:45:44 -0500 (CDT) Message-ID: <4F9B3DB7.5020308@pgexperts.com> Date: Fri, 27 Apr 2012 17:45:43 -0700 From: Jeff Frost Organization: PostgresSQL Experts, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: Tom Lane CC: pgsql-bugs@postgresql.org Subject: Re: 9.1.3 backends getting stuck in 'startup' 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> In-Reply-To: <9495.1335573058@sss.pgh.pa.us> X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/201 X-Sequence-Number: 32952 On 04/27/12 17:30, Tom Lane wrote: > Jeff Frost 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 CTO, PostgreSQL Experts, Inc. Phone: 1-888-PG-EXPRT x506 FAX: 415-762-5122 http://www.pgexperts.com/