Re: [sqlsmith] Planner crash on foreign table join
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Andreas Seltenreich <seltenreich@gmx.de>, pgsql-hackers@postgresql.org,
Simon Riggs <simon@2ndquadrant.com>
Date: 2017-04-08T16:27:43Z
Lists: pgsql-hackers
Andrew Gierth <andrew@tao11.riddles.org.uk> writes: > "Andreas" == Andreas Seltenreich <seltenreich@gmx.de> writes: > Andreas> testing master at f0e44021df with a loopback postgres_fdw > Andreas> installed, I see lots of crashes on queries joining foreign > Andreas> tables with various expressions. Below is a reduced recipe > Andreas> for the regression database and a backtrace. > Commit ac2b095088 assumes that clauselist_selectivity is being passed a > list of RelOptInfo, but postgres_fdw is passing it a list of bare > clauses. One of them is wrong :-) It's a bit scary that apparently none of the committed regression tests caught that. More generally, I think the convention up to now has been that clauselist_selectivity would work on either RestrictInfos or bare boolean clauses, caching its results in the former case but succeeding anyway. If we're to standardize on only one of those behaviors it should certainly be the former, but I think postgres_fdw is probably not the only code that will be broken if we remove the option for the latter. regards, tom lane
Commits
-
Improve castNode notation by introducing list-extraction-specific variants.
- 8f0530f58061 10.0 landed
- ff9398052df5 9.3.17 landed
- be182d570210 9.6.3 landed
- bcb1a27dc039 9.5.7 landed
- ba0a0f3ed9e0 9.2.21 landed
- 89a41a1b6b71 9.4.12 landed
-
Clean up bugs in clause_selectivity() cleanup.
- eef8c0069e4d 10.0 landed
-
Add newly-symlinked files to "make clean" target.
- aba696d1af9a 10.0 cited
-
Reset API of clause_selectivity()
- ac2b09508834 10.0 cited