Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>, Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-08-13T02:57:25Z
Lists: pgsql-hackers
On Mon, Aug 6, 2018 at 8:30 AM, Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp> wrote: > In the above I used the test whether the relation's reloptkind is > RELOPT_BASEREL or not, but I noticed that I had overlooked the case of a > multi-level partitioned table. So I fixed that and added regression test > cases for that. I also revised comments a bit. Attached is an updated > version of the patch. + /* If so, consider partitionwise joins for that join. */ + if (IS_PARTITIONED_REL(joinrel)) + joinrel->consider_partitionwise_join = true; Maybe this should assert that the inner and outer rels have consider_partitionwise_join set. There is an Assert quite a bit earlier in the function that the parent join have it set, but I think it might make sense to check the children have it set whenever we set the flag. Aside from that I don't really have any suggestions on this. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Adjust EXPLAIN's output for disabled nodes
- 161320b4b960 18.0 cited
-
Disable support for partitionwise joins in problematic cases.
- 940487956ede 11.0 landed
- 7cfdc77023ad 12.0 landed
-
Rewrite the code that applies scan/join targets to paths.
- 11cf92f6e2e1 11.0 cited