In a moment of sheer brain fade I wrote:
> Log Message:
> -----------
> Add a time-of-preparation column to the pg_prepared_xacts view, per an
> old suggestion by Oliver Jowett. Also, add a transaction column to the
> pg_locks view to show the xid of each transaction holding or awaiting
> locks; this allows prepared transactions to be properly associated with
> the locks they own. There was already a column named 'transaction',
> and I chose to rename it to 'transactionid' --- since this column is
> new in the current devel cycle there should be no backwards compatibility
> issue to worry about.
But of course the transaction column of pg_locks is *not* new; I was
momentarily confusing it with the ones that did get added recently.
So this needs reconsideration.
We need a column to identify the transaction holding/awaiting the lock,
as well as one for the identity of a lock taken on a transaction ID.
In a green field, I think the names I used in the patch would be good
("transaction" and "transactionid" respectively). The best backward-
compatible names I can think of are "xid" and "transaction", which
aren't very attractive. Any better ideas? How important do you think
it is to preserve the column name of this pg_locks column?
regards, tom lane