pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tobias Brox <tobixen@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: locking issue on simple selects?
Date: Wed, 15 Sep 2010 15:21:18 -0400
Message-ID: <23278.1284578478@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTikzssP3AKeQhM+tB_8tScRGs2iGSqTJJUg2w3DP@mail.gmail.com>
References: <AANLkTikh++7mouBb7cr2C9zMPKtRffVxDK0QFTf16HLo@mail.gmail.com>
	<4096.1284557987@sss.pgh.pa.us>
	<AANLkTikzssP3AKeQhM+tB_8tScRGs2iGSqTJJUg2w3DP@mail.gmail.com>

Tobias Brox <tobixen@gmail.com> 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



view thread (12+ messages)  latest in thread

Message-ID: <23278.1284578478@sss.pgh.pa.us>
Permalink:  ../23278.1284578478@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23278.1284578478@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tobixen@gmail.com
  Subject: Re: locking issue on simple selects?
  In-Reply-To: <23278.1284578478@sss.pgh.pa.us>

* 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