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: Andrei Lepikhov <lepihov@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-bugs@lists.postgresql.org
Date: 2024-10-13T21:08:52Z
Lists: pgsql-bugs
On Mon, Oct 14, 2024 at 12:23 AM Craig Milhiser <craig@milhiser.com> wrote:
> I have reproduced the problem with synthetic data. The script is below. Thank you for your patience with me.
Thanks, repro'd here. At first glance, it looks like it's trying to
load this distribution into a hash table and failing to handle the
skew as well as non-parallel hash:
postgres=# select user_image_id, count(*) from test_users where
account_id = -1 group by 1 order by 2 desc limit 5;
user_image_id | count
---------------+--------
| 878823 <-- choking on this?
-924960 | 1
-924934 | 1
-924917 | 1
-924971 | 1
(5 rows)
-> Parallel Hash Right Join
(cost=1027177.72..1368758.97 rows=363544 width=82)
Hash Cond: (ui.user_image_id = u.user_image_id)
-> Parallel Seq Scan on
test_user_image ui (cost=0.00..215192.79 rows=10436379 width=8)
-> Parallel Hash
(cost=1017662.42..1017662.42 rows=363544 width=82)
-> Parallel Seq Scan on
test_users u (cost=0.00..1017662.42 rows=363544 width=82)
Filter: (account_id =
'-1'::integer)
Getting coffee and looking more closely...
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