Re: SegFault on 9.6.14
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>, Thomas Munro <thomas.munro@gmail.com>, vignesh C <vignesh21@gmail.com>, Jerry Sievers <gsievers19@comcast.net>,
Tomas Vondra <tomas.vondra@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-08-14T04:42:17Z
Lists: pgsql-hackers
On Tue, Aug 13, 2019 at 9:28 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Amit Kapila <amit.kapila16@gmail.com> writes: > > On Tue, Aug 13, 2019 at 3:18 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > >> To clarify my position --- I think it's definitely possible to improve > >> the situation a great deal. We "just" have to pass down more information > >> about whether rescans are possible. > > > Right, you have speculated above that it is possible via adding some > > eflag bits. Can you please describe a bit more about that idea, so > > that somebody else can try to write a patch? > > Well, there are two components to solving this problem: > > 1. What are we going to do about the executor's external API? > > Right now, callers of ExecutorStart don't have to say whether they > might call ExecutorRewind. We need some way for callers to make a > binding promise that they won't do any such thing. Perhaps we just > want to invent another flag that's like EXEC_FLAG_BACKWARD, but it's > not clear how it should interact with the existing "soft" REWIND > flag. Yeah making it interact with REWIND will be a bit of challenge as I think to some extent the REWIND flag also indicates the same. Do I understand correctly that, we have some form of rule such that if EXEC_FLAG_REWIND is set or node's chgParam is NULL, then we can expect that node can support rescan? If it is true, then maybe we need to design this new flag in such a way that it covers existing cases of REWIND as well. Another point which I am wondering is why can't we use the existing REWIND flag to solve the current issue, basically if we have access to that information in nodeLimit.c (ExecLimit), then can't we just pass down that to ExecShutdownNode? I guess the problem could be that if LimitNode doesn't support REWIND, but one of the nodes beneath it supports that same, then we won't be able to rely on the information passed to ExecShutdownNode. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
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