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

From Alvaro Herrera
Subject Re: Adding REPACK [concurrently]
Date
Msg-id 202603261900.qbqphzjnlz7s@alvherre.pgsql
Whole thread Raw
In response to Re: Adding REPACK [concurrently]  (Srinath Reddy Sadipiralla <srinath2133@gmail.com>)
List pgsql-hackers
On 2026-Mar-25, Srinath Reddy Sadipiralla wrote:

> Hello,
> 
> While reviewing/testing V44 patch set , i found that if we run REPACK
> (CONCURRENTLY) without a table name inside a transaction block throws
> the error "REPACK CONCURRENTLY requires explicit table name" instead
> of the expected transaction block error. This occurs because
> ExecRepack() validates the parsed options and missing relation before
> verifying the transaction state.
> 
> I attached a patch below to maintain consistency with other commands
> like VACUUM, REINDEX , and more and also not to confuse the user ,
> because if user runs REPACK (CONCURRENTLY) without a table name inside
> a transaction block, if user gets "REPACK CONCURRENTLY requires
> explicit table name" and then to correct the mistake the user gives
> table and again runs the in transaction block , just to find out a new
> error "cannot run inside a transaction block".

I don't disagree with changing this, but AFAICS the patch as presented
provokes multiple test failures.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Sami Imseih
Date:
Subject: Rename LWLockNewTrancheId() parameter from "name" to "tranche_name"
Next
From: Tom Lane
Date:
Subject: Re: Document How Commit Handles Aborted Transactions