"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> Rebased to correct for pg_indent changes.
Thanks for doing that. Attached is a further small improvement that
gets rid of the find_ready_items() scans. After re-reading the patch
I realized that it wasn't *really* avoiding O(N^2) behavior ... but
this version does.
regards, tom lane