Re: ORDER BY pushdowns seem broken in postgres_fdw
Zhihong Yu <zyu@yugabyte.com>
From: Zhihong Yu <zyu@yugabyte.com>
To: Ronan Dunklau <ronan@dunklau.fr>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>,
David Zhang <david.zhang@highgo.ca>
Date: 2021-09-06T09:25:39Z
Lists: pgsql-hackers
On Mon, Sep 6, 2021 at 1:17 AM Ronan Dunklau <ronan@dunklau.fr> wrote: > Le vendredi 3 septembre 2021, 22:54:25 CEST David Zhang a écrit : > > The following review has been posted through the commitfest application: > > make installcheck-world: tested, failed > > Implements feature: tested, passed > > Spec compliant: not tested > > Documentation: not tested > > > > Applied the v6 patch to master branch and ran regression test for > contrib, > > the result was "All tests successful." > > What kind of error did you get running make installcheck-world ? If it > passed > the make check for contrib, I can't see why it would fail running make > installcheck-world. > > In any case, I just checked and running make installcheck-world doesn't > produce any error. > > Since HEAD had moved a bit since the last version, I rebased the patch, > resulting in the attached v7. > > Best regards, > > -- > Ronan Dunklau > Hi, bq. a pushed-down order by could return wrong results. Can you briefly summarize the approach for fixing the bug in the description ? + * Returns true if it's safe to push down a sort as described by 'pathkey' to + * the foreign server + */ +bool +is_foreign_pathkey(PlannerInfo *root, It would be better to name the method which reflects whether pushdown is safe. e.g. is_pathkey_safe_for_pushdown. Cheers
Commits
-
Fix postgres_fdw to check shippability of sort clauses properly.
- f3dd9fe1dd92 15.0 landed
- b9eb0412ffb8 11.16 landed
- 9f9489aa2eef 14.3 landed
- 989d3e4a2957 12.11 landed
- 79df1d20c59c 13.7 landed
- 728fc0f9a2dd 10.21 landed
-
postgres_fdw: Add ORDER BY to some remote SQL queries.
- f18c944b6137 9.6.0 cited