Re: ORDER BY pushdowns seem broken in postgres_fdw

2022-03-31 Thread Tom Lane
Ronan Dunklau writes: > Le jeudi 31 mars 2022, 01:41:37 CEST Tom Lane a écrit : >> If no objections, I think this is committable. > No objections on my end. Pushed. regards, tom lane

Re: ORDER BY pushdowns seem broken in postgres_fdw

2022-03-31 Thread Ronan Dunklau
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 th

Re: ORDER BY pushdowns seem broken in postgres_fdw

2022-03-30 Thread Tom Lane
Ronan Dunklau writes: > [ v8-0001-Fix-orderby-handling-in-postgres_fdw.patch ] I looked through this patch. It's going in the right direction, but I have a couple of nitpicks: 1. There are still some more places that aren't checking shippability of the relevant opfamily. 2. The existing usage

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-09-10 Thread David Zhang
On 2021-09-06 1:16 a.m., Ronan Dunklau 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

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-09-06 Thread Zhihong Yu
On Mon, Sep 6, 2021 at 2:41 AM Ronan Dunklau wrote: > Le lundi 6 septembre 2021, 11:25:39 CEST Zhihong Yu a écrit : > > On Mon, Sep 6, 2021 at 1:17 AM Ronan Dunklau wrote: > > > Le vendredi 3 septembre 2021, 22:54:25 CEST David Zhang a écrit : > > > > The following review has been posted through

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-09-06 Thread Ronan Dunklau
Le lundi 6 septembre 2021, 11:25:39 CEST Zhihong Yu a écrit : > On Mon, Sep 6, 2021 at 1:17 AM Ronan Dunklau 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: t

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-09-06 Thread Zhihong Yu
On Mon, Sep 6, 2021 at 1:17 AM Ronan Dunklau 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 c

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-09-06 Thread Ronan Dunklau
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 t

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-09-03 Thread David Zhang
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 con

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-26 Thread David Rowley
On Tue, 27 Jul 2021 at 17:20, Ronan Dunklau wrote: > One thing in particular I was not sure about was how to fetch the operator > associated with the path key ordering. I chose to go through the opfamily > recorded on the member, but maybe locating the original SortGroupClause by its > ref and get

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-26 Thread Ronan Dunklau
Le mardi 27 juillet 2021, 03:19:18 CEST David Rowley a écrit : > On Thu, 22 Jul 2021 at 20:49, Ronan Dunklau wrote: > > Le jeudi 22 juillet 2021, 09:44:54 CEST David Rowley a écrit : > > > Can you also use explain (verbose, costs off) the same as the other > > > tests in that area. Having the cos

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-26 Thread David Rowley
On Thu, 22 Jul 2021 at 20:49, Ronan Dunklau wrote: > > Le jeudi 22 juillet 2021, 09:44:54 CEST David Rowley a écrit : > > Can you also use explain (verbose, costs off) the same as the other > > tests in that area. Having the costs there would never survive a run > > of the buildfarm. Different ha

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-22 Thread Ranier Vilela
Em qui., 22 de jul. de 2021 às 04:00, Ronan Dunklau escreveu: > Le jeudi 22 juillet 2021, 02:16:52 CEST Ranier Vilela a écrit : > > Unfortunately your patch does not apply clear into the head. > > So I have a few suggestions on v2, attached with the .txt extension to > > avoid cf bot. > > Please,

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-22 Thread Ronan Dunklau
Le jeudi 22 juillet 2021, 09:44:54 CEST David Rowley a écrit : > +-- This will not be pushed either > +explain verbose select * from ft2 order by c1 using operator(public.<^); > + QUERY PLAN > +

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-22 Thread David Rowley
On Thu, 22 Jul 2021 at 19:00, Ronan Dunklau wrote: > Please find it reattached. +-- This will not be pushed either +explain verbose select * from ft2 order by c1 using operator(public.<^); + QUERY PLAN +-

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-22 Thread Ronan Dunklau
Le jeudi 22 juillet 2021, 02:16:52 CEST Ranier Vilela a écrit : > Unfortunately your patch does not apply clear into the head. > So I have a few suggestions on v2, attached with the .txt extension to > avoid cf bot. > Please, if ok, make the v3. Hum weird, it applied cleanly for me, and was format

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-21 Thread Ranier Vilela
Em qua., 21 de jul. de 2021 às 11:33, Ronan Dunklau escreveu: > Le mercredi 21 juillet 2021 15:45:15 CEST, vous avez écrit : > > On Thu, 22 Jul 2021 at 00:28, Ronan Dunklau > wrote: > > > The attached patch does the following: > > > - verify the opfamily is shippable to keep pathkeys > > > -

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-21 Thread Ronan Dunklau
Le mercredi 21 juillet 2021 15:45:15 CEST, vous avez écrit : > On Thu, 22 Jul 2021 at 00:28, Ronan Dunklau wrote: > > The attached patch does the following: > > - verify the opfamily is shippable to keep pathkeys > > - generate a correct order by clause using the actual operator. > > Thanks f

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-21 Thread David Rowley
On Thu, 22 Jul 2021 at 00:28, Ronan Dunklau wrote: > The attached patch does the following: > - verify the opfamily is shippable to keep pathkeys > - generate a correct order by clause using the actual operator. Thanks for writing the patch. This is just a very superficial review. I've not

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-21 Thread Ronan Dunklau
Le mercredi 21 juillet 2021, 11:05:14 CEST Ronan Dunklau a écrit : > Le mercredi 21 juillet 2021, 04:25:00 CEST David Rowley a écrit : > > Here the test claims that it wants to ensure that the order by using > > operator(public.<^) is not pushed down into the foreign scan. > > However, unless I'm m

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-21 Thread Ronan Dunklau
Le mercredi 21 juillet 2021, 04:25:00 CEST David Rowley a écrit : > Here the test claims that it wants to ensure that the order by using > operator(public.<^) is not pushed down into the foreign scan. > However, unless I'm mistaken, it seems there's a completely wrong > assumption there that the pl

ORDER BY pushdowns seem broken in postgres_fdw

2021-07-20 Thread David Rowley
I'm working on a patch [1] to get the planner to consider adding PathKeys to satisfy ORDER BY / DISTINCT aggregates. I think this has led me to discover some problems with postgres_fdw's handling of pushing down ORDER BY clauses into the foreign server. The following test exists in the postgres_f