On Thu, Mar 5, 2020 at 11:45 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > I think we can keep such a flag in TopTransactionState. We free such > locks after the work is done (except during error where we free them > at transaction abort) rather than at transaction commit, so one might > say it is better not to associate with transaction state, but not sure > if there is other better place. Do you have any suggestions?
I assumed it would be a global variable in lock.c. lock.c has got to know when any lock is required or released, so I don't know why we need to involve xact.c in the bookkeeping. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company