Re: A concurrent VACUUM FULL?

From: Erik Nordström <erik(at)timescale(dot)com>
To: Antonin Houska <ah(at)cybertec(dot)at>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: A concurrent VACUUM FULL?
Date: 2025-06-30 11:29:49
Message-ID: CACAa4V+QxR+x6z6TT2jDVFU7c=cMjsgz4br5SqjXfXM0qurNGA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 30, 2025 at 12:03 PM Antonin Houska <ah(at)cybertec(dot)at> wrote:

> Erik Nordström <erik(at)timescale(dot)com> wrote:
>
> > Hi hackers,
> >
> > I've been looking at the code for CLUSTER/VACUUM FULL, and whether it is
> possible to do a concurrent version of it using a
> > multi-transactional approach similar to concurrent reindexing and
> partition detach.
> >
> > The idea would be to hold weaker locks in TX1 when doing the heap
> rewrite (essentially allow reads but prevent writes), and then do the
> > actual heap swap in a second TX2 transaction.
>
> Patch [1] is in the queue that allows both reads and writes. (An exclusive
> lock is acquired here for the swaps, but that should be held for very short
> time.)
>
>
That sounds great. Do you know if there's anything I can do to help?

- Erik

> --
> Antonin Houska
> Web: https://www.cybertec-postgresql.com
>
> [1] https://commitfest.postgresql.org/patch/5117/
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniil Davydov 2025-06-30 11:32:47 Re: Prevent internal error at concurrent CREATE OR REPLACE FUNCTION
Previous Message Amit Kapila 2025-06-30 11:22:34 Re: Conflict detection for update_deleted in logical replication