Re: Reference to - BUG #18349: ERROR: invalid DSA memory alloc request size 1811939328, CONTEXT: parallel worker
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Craig Milhiser <craig@milhiser.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-bugs@lists.postgresql.org
Date: 2024-09-23T02:23:17Z
Lists: pgsql-bugs
On Mon, Sep 23, 2024 at 1:46 PM Thomas Munro <thomas.munro@gmail.com> wrote: > 432 bytes Oh, as Tomas pointed out in the referenced thread, the actual number depends on the number of workers because there is some per-worker state for partitions, but that number does seem consistent with your reported case. Perhaps the correct answer is simply to give up partitioning when the partition state size would exceed the potential hash table savings by further partitioning. Another question is whether it's arriving at the problematic number by underestimating and then repeatedly expanding, which is very inefficient, or planning the high number from the outset, but either way that'd be two different code paths that would need to respect a new cap. If it's the former, there may also be ways to improve initial estimates with statistics.
Commits
-
Fix extreme skew detection in Parallel Hash Join.
- 98c7c7152d2d 18.0 landed
- 4ac5d33a8b08 17.1 landed
- 53edc948580f 16.5 landed
- 1831545ca186 15.9 landed
- 20d94899414a 14.14 landed
- 45329466fdc9 13.17 landed
- 4fa80a6d7d4b 12.21 landed