Re: Parallel autovacuum: leader crashes when no DSM segment can be created

From: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Parallel autovacuum: leader crashes when no DSM segment can be created
Date: 2026-10-21 20:40:36
Message-ID: CAJTYsWWuyaYtRpRhJkdP+sqiu7_v9t2cTwfjp2MX+8PnfHjZDg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wed, 30 Sept 2026 at 15:38, Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
wrote:
>
> I wonder if we should also back out of parallel_vacuum_init() when
> pcxt->seg is NULL, like the parallel index builds do.
>
> AFAICS, we otherwise go on to TidStoreCreateShared(), which needs
> another DSM segment. That seems to defeat the leader-only fallback
> when DSM slots stay exhausted. On master, with another session holding
> every DSM slot, VACUUM (PARALLEL 2) fails with "too many dynamic shared
> memory segments", while VACUUM (PARALLEL 0) succeeds.
>
> The attached patch returns NULL there, letting the caller use a local
> TidStore, and drops the nworkers check from cc053b6e127, which I think
> becomes redundant?
>
> Am I missing a reason to keep the shared TidStore in the no-worker case?

Registered this in commitfest:https://commitfest.postgresql.org/patch/7380/

Regards,
Ayush

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Baji Shaik 2026-10-21 20:42:28 Fix rescan costing of single-batch hash joins
Previous Message Bharath Rupireddy 2026-10-21 20:15:00 Re: Introduce XID age based replication slot invalidation