Robert Haas <robertmhaas@gmail.com> writes:
> ... But scanning backwards is
> a problem. I'm not exactly sure what the best way of handling that
> is, but one thing I think might work is to save ExecutePlan's
> execute_once flag in the EState and then make the call in nodeLimit.c
> and the one in ExecutePlan itself conditional on that flag. If we
> know that the plan is only going to be executed once, then there can
> never be any backward fetches and it's fine to shut down as soon as we
> finish going forward.
Shouldn't this be dealt with by a eflag bit passed down at executor
init time? What you're describing sounds a lot like somebody
invented a different way because they were unfamiliar with eflags.
regards, tom lane