From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Jerry Sievers <gsievers19(at)comcast(dot)net>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: SegFault on 9.6.14 |
Date: | 2019-07-18 13:45:06 |
Message-ID: | 21011.1563457506@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thomas Munro <thomas(dot)munro(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Thom Brown | 2019-07-18 14:08:06 | Re: SQL/JSON path issues/questions |
Previous Message | Ryan Lambert | 2019-07-18 13:07:53 | Re: Built-in connection pooler |