Re: Consistent segfault in complex query
Andrew Gierth <andrew@tao11.riddles.org.uk>
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kyle Samson <kysamson@tripadvisor.com>,
"pgsql-hackers\@postgresql.org" <pgsql-hackers@postgresql.org>,
Matthew Kelly <mkelly@tripadvisor.com>
Date: 2018-09-12T16:08:08Z
Lists: pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes: >> There's a relevant commit from Feb this year (ea6d67cf8) >> specifically referring to the case of CTEs inside subplans inside >> EvalPlanQual, which is exactly the scenario you have in your query. >> So you need to try this in 9.3.22 or later (ideally 9.3.24, the >> latest) which contain this fix. Tom> I'm not entirely convinced that that fix will cure this, but Tom> certainly it seems related, and we should find out whether it has Tom> any effect. I agree. Tom> The reason this seems possibly different is that we're apparently Tom> returning wrong data out of the sub-select (a zero Datum value, Tom> but not marked isnull --- if it were, arraycontains wouldn't be Tom> reached). The previously fixed bug would have caused either Tom> multiple or missed returns of a valid CTE tuple. I have some ideas as to why, and I'm poking at them in order to create a test case (no luck yet, but I'll keep at it). -- Andrew (irc:RhodiumToad)
Commits
-
Fix failure with initplans used conditionally during EvalPlanQual rechecks.
- f13e2d1cec9b 11.0 landed
- 9b14bbd52c8c 9.5.15 landed
- 99cbbbbd1ddd 10.6 landed
- 8494755109e9 9.4.20 landed
- 591d0ac8858c 9.3.25 landed
- 2a97a0ad34da 9.6.11 landed
- 1f4a920b7309 12.0 landed