Re: SegFault on 9.6.14
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>,
Jerry Sievers <gsievers19@comcast.net>,
Tomas Vondra <tomas.vondra@2ndquadrant.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>,
Robert Haas <robertmhaas@gmail.com>
Date: 2019-07-18T13:45:06Z
Lists: pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes: > Hmm, so something like a new argument "bool final" added to the > ExecXXXShutdown() functions, which receives false in this case to tell > it that there could be a rescan so keep the parallel context around. I think this is going in the wrong direction. Nodes should *always* assume that a rescan is possible until ExecEndNode is called. See the commentary about EXEC_FLAG_REWIND in executor.h: * REWIND indicates that the plan node should try to efficiently support * rescans without parameter changes. (Nodes must support ExecReScan calls * in any case, but if this flag was not given, they are at liberty to do it * through complete recalculation. Note that a parameter change forces a * full recalculation in any case.) If nodeLimit is doing something that's incompatible with that, it's nodeLimit's fault; and similarly for the parallel machinery. If you want to do otherwise, you are going to be inventing a whole bunch of complicated and doubtless-initially-buggy control logic to pass down information about whether a rescan might be possible. That doesn't sound like a recipe for a back-patchable fix. Perhaps we could consider redesigning the rules around REWIND in a future version, but that's not where to focus the bug fix effort. regards, tom lane
Commits
-
Don't shut down Gather[Merge] early under Limit.
- 1ad0df67c790 9.6.17 landed
- f7ae68aacd9d 10.12 landed
- d0ccfa9d6a3d 11.7 landed
- 1cc3a90c7551 12.2 landed
- 080313f8296f 13.0 landed
-
Prohibit shutting down resources if there is a possibility of back up.
- 2cd0acfdade8 12.0 cited
-
Fix buffer usage stats for parallel nodes.
- 19df1702f5c5 9.6.10 cited
- 85c9d3475e4f 12.0 cited
-
Fix crashes on plans with multiple Gather (Merge) nodes.
- fd7c0fa732d9 11.0 cited
-
Separate reinitialization of shared parallel-scan state from ExecReScan.
- 41b0dd987d44 11.0 cited