Heikki Linnakangas <heikki@enterprisedb.com> writes:
> Tom Lane wrote:
>> What sort of "wait for finish" mechanism do you have in mind?
> I was thinking of XactLockTableWait.
Ugh. I don't think the bgwriter can participate in heavyweight-lockmgr
operations, or should become able to.
Nor will that work for prepared xacts --- you don't want to wait for the
eventual commit, only for PREPARE TRANSACTION to exit its critical
section.
regards, tom lane