pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #19105: Parallel Hash Join crash when work_mem is small
5+ messages / 4 participants
[nested] [flat]
* BUG #19105: Parallel Hash Join crash when work_mem is small
@ 2025-11-08 22:01 PG Bug reporting form <noreply@postgresql.org>
2025-11-09 15:47 ` Re: BUG #19105: Parallel Hash Join crash when work_mem is small Tom Lane <tgl@sss.pgh.pa.us>
2025-11-09 22:35 ` Re: BUG #19105: Parallel Hash Join crash when work_mem is small Thomas Munro <thomas.munro@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: PG Bug reporting form @ 2025-11-08 22:01 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: nageshdbaa@gmail.com
The following bug has been logged on the website:
Bug reference: 19105
Logged by: Nagesh Ka
Email address: nageshdbaa@gmail.com
PostgreSQL version: 16.2
Operating system: Ubuntu 22.04 x86_64
Description:
PostgreSQL version: 16.2 (Ubuntu 22.04 x86_64)
Compiled by gcc (Ubuntu 11.4.0)
work_mem = 1MB
max_parallel_workers_per_gather = 4
CREATE TABLE t1 AS SELECT i, md5(i::text) AS txt FROM
generate_series(1,1000000) i;
CREATE TABLE t2 AS SELECT i, md5(i::text) AS txt FROM
generate_series(1,1000000) i;
SET work_mem = '1MB';
SET max_parallel_workers_per_gather = 4;
SELECT t1.i, count(*)
FROM t1 JOIN t2 USING(i)
GROUP BY t1.i;
-->Expected Result
Query should complete successfully and return a count for each key.
-->Observed Result
Server terminates with:
ERROR: could not attach to dynamic shared area
DETAIL: invalid dsa_handle
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #19105: Parallel Hash Join crash when work_mem is small
2025-11-08 22:01 BUG #19105: Parallel Hash Join crash when work_mem is small PG Bug reporting form <noreply@postgresql.org>
@ 2025-11-09 15:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2025-11-09 17:49 ` Re: BUG #19105: Parallel Hash Join crash when work_mem is small Tomas Vondra <tomas@vondra.me>
1 sibling, 1 reply; 5+ messages in thread
From: Tom Lane @ 2025-11-09 15:47 UTC (permalink / raw)
To: nageshdbaa@gmail.com; +Cc: pgsql-bugs@lists.postgresql.org
PG Bug reporting form <noreply@postgresql.org> writes:
> PostgreSQL version: 16.2
> Server terminates with:
> ERROR: could not attach to dynamic shared area
> DETAIL: invalid dsa_handle
I could not reproduce this problem with current sources
(either master or v16 branch tip). 16.2 is pretty old,
so maybe an update will fix it for you.
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #19105: Parallel Hash Join crash when work_mem is small
2025-11-08 22:01 BUG #19105: Parallel Hash Join crash when work_mem is small PG Bug reporting form <noreply@postgresql.org>
2025-11-09 15:47 ` Re: BUG #19105: Parallel Hash Join crash when work_mem is small Tom Lane <tgl@sss.pgh.pa.us>
@ 2025-11-09 17:49 ` Tomas Vondra <tomas@vondra.me>
0 siblings, 0 replies; 5+ messages in thread
From: Tomas Vondra @ 2025-11-09 17:49 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; nageshdbaa@gmail.com; +Cc: pgsql-bugs@lists.postgresql.org
On 11/9/25 16:47, Tom Lane wrote:
> PG Bug reporting form <noreply@postgresql.org> writes:
>> PostgreSQL version: 16.2
>
>> Server terminates with:
>
>> ERROR: could not attach to dynamic shared area
>> DETAIL: invalid dsa_handle
>
> I could not reproduce this problem with current sources
> (either master or v16 branch tip). 16.2 is pretty old,
> so maybe an update will fix it for you.
>
FWIW I couldn't reproduce it on 16.2 either, even after forcing it to
actually do parallel hash join (the posted instructions were not enough
to make that happen on my system).
Presumably there's some additional detail making it fail, but there are
too many options to guess. Maybe it's some kernel limit, something in
ubuntu 22.04, or something else.
It's interesting the report claims this happens only "when work_mem is
small". I wonder if that happens simply because the plan changes.
regards
--
Tomas Vondra
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #19105: Parallel Hash Join crash when work_mem is small
2025-11-08 22:01 BUG #19105: Parallel Hash Join crash when work_mem is small PG Bug reporting form <noreply@postgresql.org>
@ 2025-11-09 22:35 ` Thomas Munro <thomas.munro@gmail.com>
2025-11-09 23:40 ` Re: BUG #19105: Parallel Hash Join crash when work_mem is small Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Munro @ 2025-11-09 22:35 UTC (permalink / raw)
To: nageshdbaa@gmail.com; pgsql-bugs@lists.postgresql.org
On Mon, Nov 10, 2025 at 4:23 AM PG Bug reporting form
<noreply@postgresql.org> wrote:
> ERROR: could not attach to dynamic shared area
> DETAIL: invalid dsa_handle
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("could not attach to dynamic shared area")));
Where do we emit that DETAIL message?
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #19105: Parallel Hash Join crash when work_mem is small
2025-11-08 22:01 BUG #19105: Parallel Hash Join crash when work_mem is small PG Bug reporting form <noreply@postgresql.org>
2025-11-09 22:35 ` Re: BUG #19105: Parallel Hash Join crash when work_mem is small Thomas Munro <thomas.munro@gmail.com>
@ 2025-11-09 23:40 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 5+ messages in thread
From: Tom Lane @ 2025-11-09 23:40 UTC (permalink / raw)
To: Thomas Munro <thomas.munro@gmail.com>; +Cc: nageshdbaa@gmail.com; pgsql-bugs@lists.postgresql.org
Thomas Munro <thomas.munro@gmail.com> writes:
> On Mon, Nov 10, 2025 at 4:23 AM PG Bug reporting form
> <noreply@postgresql.org> wrote:
>> ERROR: could not attach to dynamic shared area
>> DETAIL: invalid dsa_handle
> ereport(ERROR,
> (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
> errmsg("could not attach to dynamic shared area")));
> Where do we emit that DETAIL message?
I'd not picked up on that point, but you're right: we don't emit any
such DETAIL anywhere, not in current and not in 16.2 either. Must
be a locally-modified tree, or maybe just a copy-paste error in the
report?
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2025-11-09 23:40 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-11-08 22:01 BUG #19105: Parallel Hash Join crash when work_mem is small PG Bug reporting form <noreply@postgresql.org>
2025-11-09 15:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2025-11-09 17:49 ` Tomas Vondra <tomas@vondra.me>
2025-11-09 22:35 ` Thomas Munro <thomas.munro@gmail.com>
2025-11-09 23:40 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox