pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tim Bunce <Tim.Bunce@pobox.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Brian Cox <brian.cox@ca.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: "slow" queries
Date: Mon, 2 Mar 2009 21:24:33 +0000
Message-ID: <20090302212433.GX8731@timac.local> (raw)
In-Reply-To: <22227.1236022171@sss.pgh.pa.us>
References: <49AC23FF.9070103@ca.com>
	<22227.1236022171@sss.pgh.pa.us>

On Mon, Mar 02, 2009 at 02:29:31PM -0500, Tom Lane wrote:
> Brian Cox <brian.cox@ca.com> writes:
> > select locktype,database,relation,virtualxid,virtualtransaction,pid,mode 
> > from pg_locks order by mode;
> 
> If you hadn't left out the "granted" column we could be more sure,
> but what it looks like to me is the DROP (pid 13842) is stuck behind
> the <IDLE> transaction (pid 13833).  In particular these two rows of
> pg_locks look like a possible conflict:
> 
> >   relation      | 26472437 | 26472508 |            | 15/69749 
> > | 13842 | AccessExclusiveLock
> 
> >   relation      | 26472437 | 26472508 |            | 11/131 
> > | 13833 | AccessShareLock

Would it be possible to write a stored procedure that would read
pg_locks, and other relevant tables, and list what's blocking what
in a simplified form?

Tim.



view thread (14+ messages)  latest in thread

Message-ID: <20090302212433.GX8731@timac.local>
Permalink:  ../20090302212433.GX8731@timac.local/
Also on:    postgresql.org/message-id/20090302212433.GX8731@timac.local

 · 

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: Tim.Bunce@pobox.com, tgl@sss.pgh.pa.us, brian.cox@ca.com
  Subject: Re: "slow" queries
  In-Reply-To: <20090302212433.GX8731@timac.local>

* 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