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