Skip site navigation (1) Skip section navigation (2)

Re: trivial patch: show SIREAD pids in pg_locks

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Dan Ports" <drkp(at)csail(dot)mit(dot)edu>,"Jeff Davis" <pgsql(at)j-davis(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: trivial patch: show SIREAD pids in pg_locks
Date: 2011-04-01 21:17:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> On Fri, 2011-04-01 at 13:00 -0400, Dan Ports wrote:
>> While looking into a SSI bug, I noticed that we don't actually
>> display the pid of the holding transaction, even though we have
>> that information available.
> Is there a chance that the PID will reference a backend that has
> either terminated or is idle?
Yes to both.
> That might be confusing.
With a barely larger patch we could suppress that, if that's
desirable.  Of course, there is already the same issue for the
virtualtransaction column.
As Dan mentioned, it won't show for locks which are summarized using
SLRU, nor will it show for prepared transactions pending final
commit -- at least if they're loaded from disk after recovery.  (I'm
not sure without some digging about a transaction which is prepared
and still pending commit if the server is still running from the
point of prepare.)

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2011-04-01 21:48:16
Subject: Re: Bug in autovacuum.c?
Previous:From: Jeff DavisDate: 2011-04-01 21:02:59
Subject: Re: trivial patch: show SIREAD pids in pg_locks

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group