> I think the minimum thing we ought to do about this is add an XID > column to pg_locks to show the transaction ID holding each lock. > Then you could join that to pg_prepared_xacts to see what's what. > I was also wondering about adding a current-XID column to > pg_stat_activity, and encouraging people to join pg_locks and > pg_stat_activity on XID instead of PID.
That would be awesome. Is there any performance penalty to do this? (I don't care about performance of pg_lock_status function execution, just overall overhead). > Ultimately we should maybe even remove PID from pg_locks, but probably > for backwards compatibility it'd have to be deprecated for a release > or two first. It is interesting to note that systems with stats disabled are unable to get lock owner information in this case (so what?). Merlin ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]