Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Nathan Bossart <nathandbossart(at)gmail(dot)com>
Subject: Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views
Date: 2026-08-31 20:41:37
Message-ID: apXlfl6bbh3BAKXD@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2026-Aug-29, Bharath Rupireddy wrote:

> REPACK (CONCURRENTLY) fails with a confusing "no identity index" error
> when a materialized view is specified. Please find attached a patch
> that reports a proper error, similar to the other cases in
> check_concurrent_repack_requirements(), and adds a note to the docs. I
> think this needs to be backpatched to PG19.

I think this should reuse errdetail_relkind_not_supported(). I would
add a trivial test as Kiran Kaki suggested though.

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"Most hackers will be perfectly comfortable conceptualizing users as entropy
sources, so let's move on." (Nathaniel Smith)
https://mail.gnu.org/archive/html/monotone-devel/2007-01/msg00080.html

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2026-08-31 20:47:00 Re: [PATCH] Release replication slot on error in SQL-callable slot functions
Previous Message Kiran Kaki 2026-08-31 20:31:29 Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views