Re: postgres_fdw: wrong results with self join + enable_nestloop off
Önder Kalacı <onderkalaci@gmail.com>
From: Önder Kalacı <onderkalaci@gmail.com>
To: Etsuro Fujita <etsuro.fujita@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Richard Guo <guofenglinux@gmail.com>, Nishant Sharma <nishant.sharma@enterprisedb.com>, Suraj Kharage <suraj.kharage@enterprisedb.com>, pgsql-hackers@postgresql.org
Date: 2023-08-21T13:34:24Z
Lists: pgsql-hackers
Hi, Thanks for the explanation. As described in the commit message, we assume that extensions use the > hook in a similar way to FDWs I'm not sure if it is fair to assume that extensions use any hook in any way. So my question is: does the Citus extension use the hook like this? > (Sorry, I do not fully understand Onder's explanation.) > > I haven't gone into detail about how Citus uses this hook, but I don't think we should need to explain it. In general, Citus uses many hooks, and many other extensions use this specific hook. With minor version upgrades, we haven't seen this kind of behavior change before. In general, Citus relies on this hook for collecting information about joins across relations/ctes/subqueries. So, its scope is bigger than a single join for Citus. The extension assigns a special marker(s) for RTE Relations, and then checks whether all relations with these special markers joined transitively across subqueries, such that it can decide to pushdown the whole or some parts of the (sub)query. I must admit, I have not yet looked into whether we can fix the problem within the extension. Maybe we can, maybe not. But the bigger issue is that there has usually been a clear line between the extensions and the PG itself when it comes to hooks within the minor version upgrades. Sadly, this change breaks that line. We wanted to share our worries here and find out what others think. >Except that this was only noticed after it was released in a set of minor > > versions, I would say that 6f80a8d9c should just straight up be reverted. I cannot be the one to ask for reverting a commit in PG, but I think doing it would be a fair action. We kindly ask those who handle this to think about it. Thanks, Onder
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Re-allow FDWs and custom scan providers to replace joins with pseudoconstant quals.
- 9e9931d2bf40 17.0 landed
-
Disallow replacing joins with scans in problematic cases.
- db01f26968f2 11.21 landed
- 9edf72aa7644 12.16 landed
- 730f983effa5 13.12 landed
- b0e390e6d1d6 14.9 landed
- d1ef5631e620 15.4 landed
- 695f5deb7902 16.0 landed
- 6f80a8d9c137 17.0 landed
-
doc: PQinitOpenSSL and PQinitSSL are obsolete in OpenSSL 1.1.0+
- 928e05ddfd40 16.0 cited