Re: [HACKERS] postgres_fdw bug in 9.6
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>, Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>,
Jeff Janes <jeff.janes@gmail.com>, David Steele <david@pgmasters.net>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-01-15T19:10:36Z
Lists: pgsql-hackers
On Mon, Jan 15, 2018 at 12:31 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> After some thought, it seems that there's a much simpler way that we >> could fix the problem you identified in that original email: if the >> EPQ path isn't properly sorted, have postgres_fdw's >> add_paths_with_pathkeys_for_rel stick a Sort node on top of it. I >> tried this and it does indeed fix Jeff Janes' initial test case. > > Hm. Simple is certainly good, but if there's multiple rows coming > back during an EPQ recheck then I think we have a performance problem. You are correct ... I was wrong about that part, and said so in an email on this thread sent about 45 minutes before yours. However, I still think the patch is a good fix for the immediate issue, unless you see some problem with it. It's simple and back-patchable and does not preclude further work anybody, including you, might want to do in the future. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Fix test case for 'outer pathkeys do not match mergeclauses' fix.
- d397f558d555 9.6.7 landed
- 92123c6ea212 10.2 landed
- 99f6a17dd62a 11.0 landed
-
postgres_fdw: Avoid 'outer pathkeys do not match mergeclauses' error.
- 4a81c022975e 9.6.7 landed
- 3f05a30b50a7 10.2 landed
- 4bbf6edfbd5d 11.0 landed
-
postgres_fdw: Consider foreign joining and foreign sorting together.
- aa09cd242fa7 9.6.0 cited
-
Allow foreign and custom joins to handle EvalPlanQual rechecks.
- 385f337c9f39 9.6.0 cited
-
Allow FDWs to push down quals without breaking EvalPlanQual rechecks.
- 5fc4c26db512 9.6.0 cited