Re: sublink [exists (select xxx group by grouping sets ())] causes an assertion error
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, 赵庭海(庭章) <zhaotinghai.zth@alibaba-inc.com>
Cc: pgsql-hackers <pgsql-hackers@lists.postgresql.org>, Heikki Linnakangas <hlinnaka@iki.fi>
Date: 2024-03-23T01:22:21Z
Lists: pgsql-hackers
On Fri, 2024-03-22 at 12:28 -0400, Tom Lane wrote: > Thanks for the report. I did some bisecting and found that the crash > appears at Jeff's commit c8aeaf3ab (which introduced this assertion) > and disappears at Heikki's c4649cce3 (which removed it). So I would > say that the problem is "this assertion is wrong", and we should fix > the problem by fixing the assertion, not by hacking around in distant > calling code. On the whole, since this code has been dead for > several versions, I'd be inclined to just remove the assertion. c4649cce3 didn't add additional calls to LogicalTapeSetBlocks(), so I'm not sure if the removal of the Assert was related to his changes, or if he just realized the assertion was wrong and removed it along the way? Also, without the assertion, the word "should" in the comment is ambiguous (does it mean "must not" or something else), and it still exists in master. Do we care about the calculation being wrong if there's an unfinished write? If not, I'll just clarify that the calculation doesn't take into account still-buffered data. If we do care, then something might need to be fixed. Regards, Jeff Davis
Commits
-
Clarify comment for LogicalTapeSetBlocks().
- abcea19abf3b 13.15 landed
- 24d1b9989134 14.12 landed
- b74e4a08b983 15.7 landed
- 022068ea2c60 16.3 landed
- bc5fcaa289a9 17.0 landed
-
Remove incorrect Assert introduced in c8aeaf3ab.
- bf038eb219bb 13.15 landed
- a1a51dc4fab7 14.12 landed
-
Change LogicalTapeSetBlocks() to use nBlocksWritten.
- c8aeaf3ab31e 14.0 cited