Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Why not just set a flag in there when someone nears commit and clear
> when they are about to commit?
Define "nearing commit", in such a way that you can specify where you
plan to set that flag.
regards, tom lane