Re: Assert failure on running a completed portal again

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Yugo Nagata <nagata@sraoss.co.jp>, pgsql-hackers@postgresql.org
Date: 2024-12-10T18:48:54Z
Lists: pgsql-hackers
On Tue, Dec 10, 2024 at 1:37 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> And ExecutorRun skips ExecutePlan if direction is
> NoMovementScanDirection.  So unless there are gaps in pquery.c's EOF
> checks, I think we're OK: the "re-execution" call will not reach
> ExecutePlan.  This could probably do with more commentary though.

Thanks for the research, and +1 if you feel like adding more commentary.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



Commits

  1. Doc: add some commentary about ExecutorRun's NoMovement special case.

  2. Simplify executor's determination of whether to use parallelism.

  3. Allow for parallel execution whenever ExecutorRun() is done only once.