Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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