Re: BUG #9840: Documentation bug on pg_locks

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: bashtanov(at)imap(dot)cc, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #9840: Documentation bug on pg_locks
Date: 2014-04-03 15:21:20
Message-ID: 27154.1396538480@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Michael Paquier <michael(dot)paquier(at)gmail(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message chileme88 2014-04-03 15:31:53 Re: Configuring Standby Server in PostgreSQL 9.3.3
Previous Message Mike Blackwell 2014-04-03 14:39:52 Re: BUG #9518: temporary login failure - "missing pg_hba entry"