Re: Parallel autovacuum: DROP DATABASE WITH (FORCE) fails on the parallel workers

From: shihao zhong <zhong950419(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: DROP DATABASE WITH (FORCE) fails on the parallel workers
Date: 2026-10-07 03:59:59
Message-ID: CAGRkXqS0G1oHMeoXyrj51YFo2LBjC4wU6pM3ih7DhWo1mie7rg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Sawada-san,

Attached v5 drops the lock and adds a comment on why the read is safe.
It also adds the !OidIsValid(leader->roleId) check and sets roleId to
InvalidOid directly, so only a leader with no advertised role changes
anything.

Thanks,
Shihao

Attachment Content-Type Size
v5-0001-Fix-DROP-DATABASE-FORCE-to-terminate-parallel-wor.patch application/octet-stream 7.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Lakhin 2026-10-07 04:00:00 041_checkpoint_at_promote.pl might fail due to race condition on child kill
Previous Message Michael Paquier 2026-10-07 03:58:00 Re: pgstat: allow a stats kind to use its own dedicated dsa/dshash