Re: ORDER BY pushdowns seem broken in postgres_fdw

Ronan Dunklau <ronan.dunklau@aiven.io>

From: Ronan Dunklau <ronan.dunklau@aiven.io>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org, David Zhang <david.zhang@highgo.ca>, Zhihong Yu <zyu@yugabyte.com>
Date: 2022-03-31T08:02:54Z
Lists: pgsql-hackers
Le jeudi 31 mars 2022, 01:41:37 CEST Tom Lane a écrit :
> I looked through this patch.  It's going in the right direction,
> but I have a couple of nitpicks:

Thank you Tom for taking a look at this.

> I think that instead of doubling down on a wrong API, we should just
> take that out and move the logic into postgres_fdw.c.  This also has
> the advantage of producing a patch that's much safer to backpatch,
> because it doesn't rely on the core backend getting updated before
> postgres_fdw.so is.

It makes total sense.

> If no objections, I think this is committable.

No objections on my end.

-- 
Ronan Dunklau





Commits

  1. Fix postgres_fdw to check shippability of sort clauses properly.

  2. postgres_fdw: Add ORDER BY to some remote SQL queries.