Re: [HACKERS] PassDownLimitBound for ForeignScan/CustomScan [take-2] - Mailing list pgsql-hackers

From Jeevan Chalke
Subject Re: [HACKERS] PassDownLimitBound for ForeignScan/CustomScan [take-2]
Date
Msg-id CAM2+6=XSwHGq5RgGwTc97dZ9TohWj9+kWfO2dVUCbcu0A9ebfw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] PassDownLimitBound for ForeignScan/CustomScan [take-2]  (Kouhei Kaigai <kaigai@ak.jp.nec.com>)
Responses Re: [HACKERS] PassDownLimitBound for ForeignScan/CustomScan [take-2]
List pgsql-hackers
Hi,

I have reviewed this patch further and here are my comments:

1.
Will it be better to use compare_pathkeys() instead of
equal(root->query_pathkeys, pathkeys)?

2.
I think it will be good if we add a simple test-case in postgres_fdw.sql
which shows that LIMIT is passed to remote server. We might convert one of
the affected EXPLAIN to EXPLAIN ANALYZE.
With this patch, we do push LIMIT on foreign server but not at planning time.
Thus we still show remote query in EXPLAIN output without LIMIT clause but we
actually push that at execution time. Such explain plan confuses the reader.
So I think we better convert them to EXPLAIN ANALYZE or put some comments
before the query explaining this. I prefer to put comments as EXPLAIN ANALYZE
is costly.

3.
"-- CROSS JOIN, not pushed down"
Above comment need to be changed now.
As you explained already, due to limit clause, CROSS-JOIN is pushed down to
remote server, thus need to update this comment.

Rest of the changes look good to me.

Thanks

--
Jeevan Chalke
Principal Software Engineer, Product Development
EnterpriseDB Corporation
The Enterprise PostgreSQL Company

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] Relation cache invalidation on replica
Next
From: Masahiko Sawada
Date:
Subject: [HACKERS] Typo in snapbuild.c