Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 286F51337C34 for ; Wed, 15 Sep 2010 16:33:05 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 67419-03 for ; Wed, 15 Sep 2010 19:32:57 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outbound.afilias.info (outbound.afilias.info [69.46.124.26]) by mail.postgresql.org (Postfix) with ESMTP id A1CDE1337F6E for ; Wed, 15 Sep 2010 16:32:57 -0300 (ADT) Received: from ms6.yyz2.afilias-ops.info ([10.50.129.112] helo=smtp.afilias.info) by outbound.afilias.info with esmtp (Exim 4.69) (envelope-from ) id 1Ovxiz-0005Wz-6W for pgsql-performance@postgresql.org; Wed, 15 Sep 2010 19:32:57 +0000 Received: from tor-gateway.afilias.info ([199.15.87.4] helo=[10.10.46.12]) by smtp.afilias.info with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1Ovxiy-0005zJ-9F for pgsql-performance@postgresql.org; Wed, 15 Sep 2010 19:32:56 +0000 Message-ID: <4C911F68.6020507@ca.afilias.info> Date: Wed, 15 Sep 2010 15:32:56 -0400 From: Brad Nicholson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100908 Lightning/1.0b2 Thunderbird/3.1.3 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: locking issue on simple selects? References: <4096.1284557987@sss.pgh.pa.us> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201009/94 X-Sequence-Number: 40297 On 10-09-15 03:07 PM, Tobias Brox wrote: > On 15 September 2010 15:39, Tom Lane wrote: >> An exclusive lock will block selects too. Have you looked into pg_locks >> for ungranted lock requests? > Well - I thought so, we have a logging script that logs the content of > the pg_locks table, it didn't log anything interesting but it may be a > problem with the script itself. It does an inner join on > pg_locks.relation = pg_class.oid but when I check now this join seems > to remove most of the rows in the pg_locks table. Does it make sense > at all to join pg_class with pg_locks? I will ask the sysadm to > change to an outer join as for now. > You can also enable log_lock_waits and the lock waits will appear in your Postgres logs. -- Brad Nicholson 416-673-4106 Database Administrator, Afilias Canada Corp.