Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.
Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
From: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>,
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>,
Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>,
Tom Lane <tgl@sss.pgh.pa.us>
Date: 2018-08-01T11:44:35Z
Lists: pgsql-hackers
Attachments
- redesign-pwj-child-tlist-handling-3.patch (text/x-diff) patch
(2018/07/26 21:11), Etsuro Fujita wrote: > (2018/07/26 5:27), Robert Haas wrote: >> Well, I could have the wrong idea here, but I tend to think allowing >> for ConvertRowTypeExpr elsewhere won't be that bad. > > I still don't like that because in my opinion, changes needed for that > would not be localized, and that would make code complicated more than > necessary. > > As I mentioned in a previous email, another idea to avoid that would be > to adjust tlists for children at path creation time, not plan creation > time; we could adjust the tlist for each of subpaths accumulated for an > Append/MergeAppend path in add_paths_to_append_rel called from > set_append_rel_pathlist or generate_partitionwise_join_paths, with > create_projection_path adding ConvertRowTypeExpr. It seems unlikely that > performing create_projection_path to such a subpath would change its > property of being the cheapest, so it would be safe to adjust the tlists > that way. This would not require making create_plan complicated anymore. > I might be missing something, though. I updated the patch that way. Updated patch attached. I fixed a bug and did a bit of cleanups as well. Best regards, Etsuro Fujita
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