Re: Oversight in reparameterize_path_by_child leading to executor crash
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
From: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Richard Guo <guofenglinux@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2023-08-22T16:07:22Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Postpone reparameterization of paths until create_plan().
- b7e2121ab7d6 17.0 landed
-
Apply band-aid fix for an oversight in reparameterize_path_by_child.
- e031995d5c26 14.11 landed
- 7af96a66f43c 13.14 landed
- 62f120203147 16.2 landed
- 2e822a1d62d0 12.18 landed
- 12ec16d11c8b 15.6 landed
Attachments
- 0001-Delay-reparameterization-of-paths-till-create_plan.patch (text/x-patch) patch 0001
- 0002-Combine-reparameterize_path_by_child-and-path_is_rep.patch (text/x-patch) patch 0002
Hi Tom, On Tue, Aug 22, 2023 at 2:18 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > (BTW, I did look at Ashutosh's idea of merging the > reparameterize_path_by_child and path_is_reparameterizable_by_child > functions, but I didn't think that would be an improvement, > because we'd have to clutter reparameterize_path_by_child with > a lot of should-I-skip-this-step tests. Some of that could be > hidden in the macros, but a lot would not be. Another issue > is that I do not think we can change reparameterize_path_by_child's > API contract in the back branches, because we advertise it as > something that FDWs and custom scan providers can use.) Here are two patches 0001 same as your v5 patch 0002 implements what I had in mind - combining the assessment and reparameterization in a single function. I don't know whether you had something similar to 0002 when you considered that approach. Hence implemented it quickly. The names of the functions and arguments can be changed. But I think this version will help us keep assessment and actual reparameterization in sync, very tightly. Most of the conditionals have been pushed into macros, except for two which need to be outside the macros and actually look better to me. Let me know what you think of this. FWIW I ran make check and all the tests pass. I agree that we can not consider this for backbranches but we are anyway thinking of disabling reparameterization for tablesample scans anyway. -- Best Wishes, Ashutosh Bapat