Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 099EE133798F for ; Wed, 15 Sep 2010 16:21:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 17420-05 for ; Wed, 15 Sep 2010 19:21:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id AA9BC133798E for ; Wed, 15 Sep 2010 16:21:19 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o8FJLIJO023279; Wed, 15 Sep 2010 15:21:18 -0400 (EDT) To: Tobias Brox cc: pgsql-performance@postgresql.org Subject: Re: locking issue on simple selects? In-reply-to: References: <4096.1284557987@sss.pgh.pa.us> Comments: In-reply-to Tobias Brox message dated "Wed, 15 Sep 2010 21:07:24 +0200" Date: Wed, 15 Sep 2010 15:21:18 -0400 Message-ID: <23278.1284578478@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201009/92 X-Sequence-Number: 40295 Tobias Brox writes: > 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. There are lots of locks that are not tied to a specific table, so an inner join is definitely bad. You could use an outer join to annotate rows that do correspond to table locks, though. regards, tom lane