pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@kurilemu.de>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Antonin Houska <ah@cybertec.at>
Cc: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: REPACK (CONCURRENTLY) rewrites tables marked with user_catalog_table
Date: Tue, 8 Sep 2026 14:47:39 +0200
Message-ID: <aqABL-HzgIjAvCFp@alvherre.pgsql> (raw)
In-Reply-To: <CAD21AoAqrYhAKC6VaMP9_X4_XvpoS5aSByU4B3Hcm_LXVxcRQg@mail.gmail.com>

Hello,

On 2026-Sep-04, Masahiko Sawada wrote:

> I reviewed the patch. It's simple and I agree to add a check for user
> catalog tables. I've slightly rephrased the comment in
> check_concurrent_repack_requirements() to clarify the reason why
> REPACK (CONCURRENTLY) doesn't support user catalog tables while it
> does for normal tables even though it's a MVCC-unsafe operation. Also
> updated the commit message as well. Please review it.

Thanks, I gave this a look and I think it's okay.  I'm not sure about
the exact wording of the error message though,

> +		ereport(ERROR,
> +				errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
> +				errmsg("cannot execute %s on relation \"%s\"",
> +					   "REPACK (CONCURRENTLY)", RelationGetRelationName(rel)),
> +				errhint("%s is not supported for tables used as catalog tables.",
> +						"REPACK (CONCURRENTLY)"));

ERROR:  cannot execute REPACK (CONCURRENTLY) on relation "foobar"
HINT:  REPACK (CONCURRENTLY) is not supported for tables used as catalog tables.

I think the HINT should really be DETAIL, and I'm not sure we need to
mention the command again there.  On the other hand, I'm not really
happy with the term "tables used as catalog tables".  In the
documentation we use the term "user provided catalog tables" or simply
"user catalog tables" (see <sect2 id="logicaldecoding-capabilities">).
So how about something like this?

ERROR:  cannot execute REPACK (CONCURRENTLY) on relation "foobar"
DETAIL:  This operation is not supported for user catalog tables.


Would you push this patch, or do you want me to?

Thanks!

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/






view thread (14+ messages)  latest in thread

Message-ID: <aqABL-HzgIjAvCFp@alvherre.pgsql>
Permalink:  ../aqABL-HzgIjAvCFp@alvherre.pgsql/
Also on:    postgresql.org/message-id/aqABL-HzgIjAvCFp@alvherre.pgsql

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@kurilemu.de, sawada.mshk@gmail.com, bharath.rupireddyforpostgres@gmail.com, ah@cybertec.at, nathandbossart@gmail.com
  Subject: Re: REPACK (CONCURRENTLY) rewrites tables marked with user_catalog_table
  In-Reply-To: <aqABL-HzgIjAvCFp@alvherre.pgsql>
  References: <CAD21AoAqrYhAKC6VaMP9_X4_XvpoS5aSByU4B3Hcm_LXVxcRQg@mail.gmail.com> <aqABL-HzgIjAvCFp@alvherre.pgsql>

* 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