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>,<pgsql-hackers(at)postgresql(dot)org>
Subject: Re: trivial patch: show SIREAD pids in pg_locks
Date: 2011-04-01 17:20:25
Message-ID: 4D95C309020000250003C140@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dan Ports <drkp(at)csail(dot)mit(dot)edu> 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.

I thought we already had that, but clearly I was mistaken.

> The attached patch fixes that.
>
> One note is that it will show the pid of the backend that executed
> the transaction, even if that transaction has already committed. I
> have no particular opinion about whether it's more useful to do
> that or return null, so went with the smallest change. (The pid is
> null for PREPARED or summarized transactions).

The patch looks good to me and a quick test shows the expected
behavior. No warnings. Regression tests pass.

I guess the question is whether it's OK to include this during the
alpha testing phase. Even though it's a little bit of a stretch to
call it a bug, the argument could be made that omitting information
which all the other rows in the view have is an inconsistency which
borders on being a bug. The small size and verifiable safety of the
patch work in its favor.

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-04-01 17:37:58 Re: [COMMITTERS] pgsql: Support comments on FOREIGN DATA WRAPPER and SERVER objects.
Previous Message Christopher Browne 2011-04-01 17:17:34 Re: Should psql support URI syntax?