From: Chao Li <li.evan.chao@gmail.com>
To: Baji Shaik <baji.pgdev@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org, Álvaro Herrera <alvherre@kurilemu.de>
Subject: Re: [PATCH] Improve REPACK (CONCURRENTLY) error messages for unsupported configurations
Date: Wed, 27 May 2026 14:50:01 +0800
Message-ID: <172EB2C2-DE11-4E5B-B115-38A7AD3B6A3D@gmail.com> (raw)
In-Reply-To: <CA+fm-ROdgh0rEVuXoViBk4TVgjodrN=MTR_RYuOuKLZ9voX4YA@mail.gmail.com>
References: <CA+fm-ROdgh0rEVuXoViBk4TVgjodrN=MTR_RYuOuKLZ9voX4YA@mail.gmail.com>
> On May 27, 2026, at 11:06, Baji Shaik <baji.pgdev@gmail.com> wrote:
>
> Hi,
>
> While exploring the new REPACK (CONCURRENTLY) feature, I noticed
> a few user-facing error paths that could be made more accurate.
> Patch series of three:
>
> 0001 -- When wal_level < replica, REPACK (CONCURRENTLY) currently
> surfaces generic "replication slots ... wal_level" error
> from CheckSlotRequirements(), with a CONTEXT line referring
> to an internal worker. Add an upfront check that reports a
> REPACK-specific error.
>
LGTM
> 0002 -- check_concurrent_repack_requirements() reports the same
> generic "no identity index" error for several distinct
> cases, two of which are misleading: REPLICA IDENTITY FULL
> (which is set, but the hint says there is no identity), and
> a deferrable PK as the only identity (skipped per commit
> 832e220d99a, but the hint suggests adding an index that
> already exists). Distinguish these cases.
>
When I was working on 832e220d99a, I actually considered for more detailed error messages, but I ended up giving up. I think we should be careful about adding more branches here unless the existing message is causing significant confusion in practice.
So, I personally don’t like 0002.
> 0003 -- Four ereport(ERROR) calls in the REPACK CONCURRENTLY code
> path lack errcode() and default to ERRCODE_INTERNAL_ERROR.
> Add appropriate errcodes; in particular, the
> apply_concurrent_update/delete failures map cleanly to
> ERRCODE_T_R_SERIALIZATION_FAILURE.
>
LGTM
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: li.evan.chao@gmail.com, baji.pgdev@gmail.com, alvherre@kurilemu.de
Subject: Re: [PATCH] Improve REPACK (CONCURRENTLY) error messages for unsupported configurations
In-Reply-To: <172EB2C2-DE11-4E5B-B115-38A7AD3B6A3D@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox