Re: Oversight in reparameterize_path_by_child leading to executor crash
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: Richard Guo <guofenglinux@gmail.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2023-08-20T15:48:48Z
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
I looked over the v3 patch. I think it's going in generally the right direction, but there is a huge oversight: path_is_reparameterizable_by_child does not come close to modeling the success/failure conditions of reparameterize_path_by_child. In all the cases where reparameterize_path_by_child can recurse, path_is_reparameterizable_by_child has to do so also, to check whether the child path is reparameterizable. (I'm somewhat disturbed that apparently we have no test cases that caught that oversight; can we add one cheaply?) BTW, I also note from the cfbot that 9e9931d2b broke this patch by adding more ADJUST_CHILD_ATTRS calls that need to be modified. I wonder if we could get away with having that macro cast to "void *" to avoid needing to change all its call sites. I'm not sure whether pickier compilers might warn about doing it that way. regards, tom lane