Re: BUG #9840: Documentation bug on pg_locks - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #9840: Documentation bug on pg_locks
Date
Msg-id 27154.1396538480@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #9840: Documentation bug on pg_locks  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-bugs
Michael Paquier <michael.paquier@gmail.com> writes:
> At the same time, I am attaching a doc patch recommending using
> virtualtransaction instead of transaction in pg_locks when doing a
> join with pg_prepared_xacts.

That change doesn't really seem good enough to me, since exactly how to do
the join remains just as unclear as before.  I think we'd better give an
explicit example.  I'd be inclined to write it as

select * from
  pg_locks pl join pg_prepared_xacts ppx
    on pl.virtualtransaction = '-1/' || ppx.transaction;

            regards, tom lane

pgsql-bugs by date:

Previous
From: Mike Blackwell
Date:
Subject: Re: BUG #9518: temporary login failure - "missing pg_hba entry"
Next
From: shaharhd@gmail.com
Date:
Subject: BUG #9833: daterange is not utilizing index correctly