Re: Adding REPACK [concurrently] - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Adding REPACK [concurrently]
Date
Msg-id 202603162202.l2sibdzviih7@alvherre.pgsql
Whole thread Raw
In response to Re: Adding REPACK [concurrently]  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
Responses Re: Adding REPACK [concurrently]
List pgsql-hackers
On 2026-Mar-16, Matthias van de Meent wrote:

> On Mon, 16 Mar 2026 at 21:15, Antonin Houska <ah@cybertec.at> wrote:

> > Anyway (fortunately?), the concurrent use of slots by REPACK is limited
> > because, during the initialization of logical decoding, the backend needs to
> > wait for all the transactions having XID assigned to finish, and these include
> > the already running REPACK commands. See SnapBuildWaitSnapshot() and callers
> > if you're interested in details.
> 
> Huh, so would you be able to run more than one Repack Concurrently in
> the same database? ISTM that would not be possible, apart from
> possibly a mechanism comparable to the SAFE_IN_IC flag (to not wait on
> those backends).

Yeah, this sounds kind of bad news ...

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"Los dioses no protegen a los insensatos.  Éstos reciben protección de
otros insensatos mejor dotados" (Luis Wu, Mundo Anillo)



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Better shared data structure management and resizable shared data structures
Next
From: Thomas Munro
Date:
Subject: Re: A stack allocation API