Re: Assert failure on running a completed portal again
Yugo Nagata <nagata@sraoss.co.jp>
From: Yugo Nagata <nagata@sraoss.co.jp>
To: Yugo Nagata <nagata@sraoss.co.jp>
Cc: pgsql-hackers@postgresql.org
Date: 2024-12-05T21:40:40Z
Lists: pgsql-hackers
Attachments
- portal_assert_another_way.patch.txt (text/plain)
On Fri, 6 Dec 2024 06:25:49 +0900 Yugo Nagata <nagata@sraoss.co.jp> wrote: > Hi, > > I notice that the following Assert in PortalRun fails when a same portal is > executed more than once by an Execute message whose "max number of rows" > is specified to zero, that is, "no limit". > > /* Set run_once flag. Shouldn't be clear if previously set. */ > Assert(!portal->run_once || run_once); > portal->run_once = run_once; > > I tested this using pgproto [1] in Pgpool-II. > > I believe the server should return CommanComplete normally in this case. > his can be fixed by not setting execute_is_fetch flag (run_once as the result) > when the portal is already completed since no rows will be fetched in this case. > I've attached a pach in this approach. > > [1] https://www.pgpool.net/docs/latest/en/html/pgproto.html Another idea is not call PortalRun in this case like the attached patch. Which approach is better? Or, should we fix in other approach? > Regards, > Yugo Nagata > > -- > Yugo Nagata <nagata@sraoss.co.jp> -- Yugo Nagata <nagata@sraoss.co.jp>
Commits
-
Doc: add some commentary about ExecutorRun's NoMovement special case.
- 982890530379 18.0 landed
-
Simplify executor's determination of whether to use parallelism.
- bb649b553c58 16.7 landed
- 8a95ad3b205c 14.16 landed
- 556f7b7bc18d 17.3 landed
- 4d20bad5e9c6 13.19 landed
- 4089b9bd6f19 15.11 landed
- 3eea7a0c97e9 18.0 landed
-
Allow for parallel execution whenever ExecutorRun() is done only once.
- 691b8d59281b 10.0 cited