On Fri, Mar 6, 2020 at 2:19 AM Robert Haas <robertmh...@gmail.com> wrote: > > On Thu, Mar 5, 2020 at 2:18 PM Mahendra Singh Thalor <mahi6...@gmail.com> > wrote: > > Here, attaching new patch set for review. > > I was kind of assuming that the way this would work is that it would > set a flag or increment a counter or something when we acquire a > relation extension lock, and then reverse the process when we release > it. Then the Assert could just check the flag. Walking the whole > LOCALLOCK table is expensive. >
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? -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com