I wrote:
> After looking at this further, I think this whole "run_once"
> business is badly designed, worse documented, and redundant
> (as well as buggy). It can be replaced with three self-contained
> lines in ExecutePlan, as per the attached.
> (Obviously, the API changes in this wouldn't do for the back
> branches. But we could leave those arguments in place as
> unused dummies.)
Here's a cut-down version that I think would be OK to use in the
back branches.
regards, tom lane