Re: pgsql: Lock the TOAST table early in REPACK (CONCURRENTLY)

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Lock the TOAST table early in REPACK (CONCURRENTLY)
Date: 2026-09-28 15:23:34
Message-ID: arqGBKSnn1sMfYaK@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 2026-Sep-28, Álvaro Herrera wrote:

> Lock the TOAST table early in REPACK (CONCURRENTLY)
>
> The decoding worker records the relfilenumber of the TOAST table when it
> starts, and skips changes stored under any other one, but the TOAST
> table was not locked until the data copy began. If VACUUM FULL rewrote
> it while the worker was starting, concurrent updates of TOASTed columns
> were silently lost.

Oops, I used CheckRelationOidLockedByMe() assuming it does what its name
implies, which it doesn't. Will fix.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"After a quick R of TFM, all I can say is HOLY CR** THAT IS COOL! PostgreSQL was
amazing when I first started using it at 7.2, and I'm continually astounded by
learning new features and techniques made available by the continuing work of
the development team."
Berend Tober, http://archives.postgresql.org/pgsql-hackers/2007-08/msg01009.php

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Álvaro Herrera 2026-09-28 15:43:00 pgsql: Turn "check" into assertion
Previous Message Álvaro Herrera 2026-09-28 15:13:43 pgsql: Lock the TOAST table early in REPACK (CONCURRENTLY)