pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
REPACK (CONCURRENTLY) fails with wrong error for materialized views
9+ messages / 3 participants
[nested] [flat]

Commits from this thread:
  2026-09-09 412ef97d92 40d811540a  Fix error message for concurrent repack on materialized views
* REPACK (CONCURRENTLY) fails with wrong error for materialized views
@ 2026-08-29 15:58 Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
  2026-08-29 20:42 ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Kiran Kaki <itskkpg@gmail.com>
  2026-08-31 20:41 ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Álvaro Herrera <alvherre@kurilemu.de>
  0 siblings, 2 replies; 9+ messages in thread

From: Bharath Rupireddy @ 2026-08-29 15:58 UTC (permalink / raw)
  To: pgsql-hackers; +Cc: Álvaro Herrera <alvherre@kurilemu.de>; Nathan Bossart <nathandbossart@gmail.com>

Hi,

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.

Thoughts?

[1]
postgres=# CREATE MATERIALIZED VIEW m AS SELECT 1 AS a;
SELECT 1
postgres=# REPACK (CONCURRENTLY) m;
ERROR:  cannot execute REPACK (CONCURRENTLY) on relation "m"
HINT:  Relation "m" has no identity index.

-- 
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com

Attachments:

v1-0001-Fix-error-message-for-concurrent-repack-on-materi.patch (application/octet-stream, 2.4K) download From 33ea3cd2834d5061ab8ab971dcdc3002801bfefd Mon Sep 17 00:00:00 2001 From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Date: Sat, 29 Aug 2026 15:40:46 +0000 Subject: [PATCH v1] Fix error message for concurrent repack on materialized views. Previously, running REPACK (CONCURRENTLY) on a materialized view failed with a confusing "has no identity index" error. REPACK (CONCURRENTLY) replays changes decoded from WAL, but a materialized view produces none, since it cannot be modified by DML and REFRESH rewrites it through a transient heap that is not logically decoded. Fix this by reporting a clear error for materialized views up front, alongside the existing checks for system catalogs and TOAST tables, and document the limitation. Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Discussion: https://postgr.es/m/ Backpatch-through: 19 --- doc/src/sgml/ref/repack.sgml | 6 ++++++ src/backend/commands/repack.c | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/doc/src/sgml/ref/repack.sgml b/doc/src/sgml/ref/repack.sgml index 0cb72b6b289..777681252ef 100644 --- a/doc/src/sgml/ref/repack.sgml +++ b/doc/src/sgml/ref/repack.sgml @@ -279,6 +279,12 @@ REPACK [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] USING </para> </listitem> + <listitem> + <para> + The relation is a materialized view. + </para> + </listitem> + <listitem> <para> The table is a system catalog or a <acronym>TOAST</acronym> table. diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c index 477c86b2ba6..73a42af3f4d 100644 --- a/src/backend/commands/repack.c +++ b/src/backend/commands/repack.c @@ -877,6 +877,15 @@ check_concurrent_repack_requirements(Relation rel, Oid *ident_idx_p) errdetail("%s requires \"wal_level\" to be set to \"replica\" or higher.", "REPACK (CONCURRENTLY)")); + /* A materialized view produces no logically decoded changes. */ + if (rel->rd_rel->relkind == RELKIND_MATVIEW) + ereport(ERROR, + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("cannot execute %s on relation \"%s\"", + "REPACK (CONCURRENTLY)", RelationGetRelationName(rel)), + errhint("%s is not supported for materialized views.", + "REPACK (CONCURRENTLY)")); + /* Data changes in system relations are not logically decoded. */ if (IsCatalogRelation(rel)) ereport(ERROR, -- 2.47.3
^ permalink raw reply [nested|flat] 9+ messages in thread

* Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views
  2026-08-29 15:58 REPACK (CONCURRENTLY) fails with wrong error for materialized views Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
@ 2026-08-29 20:42 ` Kiran Kaki <itskkpg@gmail.com>
  2026-08-31 16:11   ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
  1 sibling, 1 reply; 9+ messages in thread

From: Kiran Kaki @ 2026-08-29 20:42 UTC (permalink / raw)
  To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>; +Cc: pgsql-hackers; Álvaro Herrera <alvherre@kurilemu.de>; Nathan Bossart <nathandbossart@gmail.com>

Hi Bharath,

I verified the change, and it works as intended. The new check is
appropriately placed before replica identity validation. The error is much
clearer than the previous "has no identity index" message, and the
documentation update looks good to me.
*My only suggestion is to add an automated*  test as it can help catch any
future regressions in this behavior.

*Verified Upstream Commit* - ec13f71049cda06ea55a67783b822d98824f4d15
*Build Status -* Successfully built with assertions enabled. No relevant
compiler warnings were observed.
*Automated Tests Validation -* The complete test suite passed which
includes the related wal level tests.
*Manual Verifications - *Verified  that REPACK (CONCURRENTLY) succeeded on
a regular table and preserved all rows. For both populated and unpopulated
materialized views, it returned the expected error and the new
materialized-view-specific hint that you introduced.

Thanks,
Kiran Kaki.

On Sat, Aug 29, 2026 at 8:58 AM Bharath Rupireddy <
bharath.rupireddyforpostgres@gmail.com> wrote:

> Hi,
>
> 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.
>
> Thoughts?
>
> [1]
> postgres=# CREATE MATERIALIZED VIEW m AS SELECT 1 AS a;
> SELECT 1
> postgres=# REPACK (CONCURRENTLY) m;
> ERROR:  cannot execute REPACK (CONCURRENTLY) on relation "m"
> HINT:  Relation "m" has no identity index.
>
> --
> Bharath Rupireddy
> Amazon Web Services: https://aws.amazon.com
>

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views
  2026-08-29 15:58 REPACK (CONCURRENTLY) fails with wrong error for materialized views Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
  2026-08-29 20:42 ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Kiran Kaki <itskkpg@gmail.com>
@ 2026-08-31 16:11   ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
  2026-08-31 20:21     ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Kiran Kaki <itskkpg@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Bharath Rupireddy @ 2026-08-31 16:11 UTC (permalink / raw)
  To: Kiran Kaki <itskkpg@gmail.com>; +Cc: pgsql-hackers; Álvaro Herrera <alvherre@kurilemu.de>; Nathan Bossart <nathandbossart@gmail.com>

Hi,

On Sat, Aug 29, 2026 at 1:42 PM Kiran Kaki <itskkpg@gmail.com> wrote:
>
> Hi Bharath,
>
> I verified the change, and it works as intended. The new check is appropriately placed before replica identity validation. The error is much clearer than the previous "has no identity index" message, and the documentation update looks good to me.
>
> My only suggestion is to add an automated  test as it can help catch any future regressions in this behavior.

Thanks for reviewing and verifying the change. I think we can skip the
test for this one since the change is straightforward and unlikely to
regress.

-- 
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com






^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views
  2026-08-29 15:58 REPACK (CONCURRENTLY) fails with wrong error for materialized views Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
  2026-08-29 20:42 ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Kiran Kaki <itskkpg@gmail.com>
  2026-08-31 16:11   ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
@ 2026-08-31 20:21     ` Kiran Kaki <itskkpg@gmail.com>
  2026-08-31 20:31       ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Kiran Kaki <itskkpg@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Kiran Kaki @ 2026-08-31 20:21 UTC (permalink / raw)
  To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>; +Cc: pgsql-hackers; Álvaro Herrera <alvherre@kurilemu.de>; Nathan Bossart <nathandbossart@gmail.com>

@Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> look like you
intended to share something, but email body just says hi.

On Mon, Aug 31, 2026, 9:11 AM Bharath Rupireddy <
bharath.rupireddyforpostgres@gmail.com> wrote:

> Hi,
>
> On Sat, Aug 29, 2026 at 1:42 PM Kiran Kaki <itskkpg@gmail.com> wrote:
> >
> > Hi Bharath,
> >
> > I verified the change, and it works as intended. The new check is
> appropriately placed before replica identity validation. The error is much
> clearer than the previous "has no identity index" message, and the
> documentation update looks good to me.
> >
> > My only suggestion is to add an automated  test as it can help catch any
> future regressions in this behavior.
>
> Thanks for reviewing and verifying the change. I think we can skip the
> test for this one since the change is straightforward and unlikely to
> regress.
>
> --
> Bharath Rupireddy
> Amazon Web Services: https://aws.amazon.com
>

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views
  2026-08-29 15:58 REPACK (CONCURRENTLY) fails with wrong error for materialized views Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
  2026-08-29 20:42 ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Kiran Kaki <itskkpg@gmail.com>
  2026-08-31 16:11   ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
  2026-08-31 20:21     ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Kiran Kaki <itskkpg@gmail.com>
@ 2026-08-31 20:31       ` Kiran Kaki <itskkpg@gmail.com>
  0 siblings, 0 replies; 9+ messages in thread

From: Kiran Kaki @ 2026-08-31 20:31 UTC (permalink / raw)
  To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>; +Cc: pgsql-hackers; Álvaro Herrera <alvherre@kurilemu.de>; Nathan Bossart <nathandbossart@gmail.com>

Hi Bharath,

Ignore my previous reply. Looks like an issue with the gmail client.

Adding a test should be quick and I can help re-validate as a second eye,
but I would let committer to take a call on this based followed practices.
Otherwise the change is good.

Thanks,
Kiran Kaki.

On Mon, Aug 31, 2026, 1:21 PM Kiran Kaki <itskkpg@gmail.com> wrote:

> @Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> look like you
> intended to share something, but email body just says hi.
>
> On Mon, Aug 31, 2026, 9:11 AM Bharath Rupireddy <
> bharath.rupireddyforpostgres@gmail.com> wrote:
>
>> Hi,
>>
>> On Sat, Aug 29, 2026 at 1:42 PM Kiran Kaki <itskkpg@gmail.com> wrote:
>> >
>> > Hi Bharath,
>> >
>> > I verified the change, and it works as intended. The new check is
>> appropriately placed before replica identity validation. The error is much
>> clearer than the previous "has no identity index" message, and the
>> documentation update looks good to me.
>> >
>> > My only suggestion is to add an automated  test as it can help catch
>> any future regressions in this behavior.
>>
>> Thanks for reviewing and verifying the change. I think we can skip the
>> test for this one since the change is straightforward and unlikely to
>> regress.
>>
>> --
>> Bharath Rupireddy
>> Amazon Web Services: https://aws.amazon.com
>>
>

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views
  2026-08-29 15:58 REPACK (CONCURRENTLY) fails with wrong error for materialized views Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
@ 2026-08-31 20:41 ` Álvaro Herrera <alvherre@kurilemu.de>
  2026-08-31 20:50   ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
  1 sibling, 1 reply; 9+ messages in thread

From: Álvaro Herrera @ 2026-08-31 20:41 UTC (permalink / raw)
  To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>; +Cc: pgsql-hackers; Nathan Bossart <nathandbossart@gmail.com>

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





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views
  2026-08-29 15:58 REPACK (CONCURRENTLY) fails with wrong error for materialized views Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
  2026-08-31 20:41 ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Álvaro Herrera <alvherre@kurilemu.de>
@ 2026-08-31 20:50   ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
  2026-08-31 21:29     ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
  2026-09-09 11:02     ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Álvaro Herrera <alvherre@kurilemu.de>
  0 siblings, 2 replies; 9+ messages in thread

From: Bharath Rupireddy @ 2026-08-31 20:50 UTC (permalink / raw)
  To: Álvaro Herrera <alvherre@kurilemu.de>; +Cc: pgsql-hackers; Nathan Bossart <nathandbossart@gmail.com>; Kiran Kaki <itskkpg@gmail.com>

 Hi,

On Mon, Aug 31, 2026 at 1:41 PM Álvaro Herrera <alvherre@kurilemu.de> wrote:
>
> 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().

Yes, that's better, let's reuse.

> I would
> add a trivial test as Kiran Kaki suggested though.

That's fine with me, I can add one for materialized views here in this
patch. Going by this, I think we also need tests for catalogs, TOAST,
and other repack-restricted cases. I'd let Kiran Kaki add such tests
in a new thread.

Thoughts?

-- 
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com






^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views
  2026-08-29 15:58 REPACK (CONCURRENTLY) fails with wrong error for materialized views Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
  2026-08-31 20:41 ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Álvaro Herrera <alvherre@kurilemu.de>
  2026-08-31 20:50   ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
@ 2026-08-31 21:29     ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
  1 sibling, 0 replies; 9+ messages in thread

From: Bharath Rupireddy @ 2026-08-31 21:29 UTC (permalink / raw)
  To: Álvaro Herrera <alvherre@kurilemu.de>; +Cc: pgsql-hackers; Nathan Bossart <nathandbossart@gmail.com>; Kiran Kaki <itskkpg@gmail.com>

Hi,

On Mon, Aug 31, 2026 at 1:50 PM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> > I think this should reuse errdetail_relkind_not_supported().
>
> Yes, that's better, let's reuse.
>
> > I would
> > add a trivial test as Kiran Kaki suggested though.
>
> That's fine with me, I can add one for materialized views here in this
> patch.

Please find the attached v2.

> Going by this, I think we also need tests for catalogs, TOAST,
> and other repack-restricted cases. I'd let Kiran Kaki add such tests
> in a new thread.

I realized that except for the wal_level and replica identity related
errors, repack seems to already have tests for the other restricted
cases.

--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com

Attachments:

v2-0001-Fix-error-message-for-concurrent-repack-on-materi.patch (application/x-patch, 4.4K) download From 43172981a95f4541ca97e7b369fe72720bbbf4bc Mon Sep 17 00:00:00 2001 From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Date: Mon, 31 Aug 2026 21:13:46 +0000 Subject: [PATCH v2] Fix error message for concurrent repack on materialized views. Previously, running REPACK (CONCURRENTLY) on a materialized view failed with a confusing "has no identity index" error. REPACK (CONCURRENTLY) replays changes decoded from WAL, but a materialized view produces none, since it cannot be modified by DML and REFRESH rewrites it through a transient heap that is not logically decoded. Fix this by reporting a clear error for materialized views up front, alongside the existing checks for system catalogs and TOAST tables, and document the limitation. Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Reviewed-by: Kiran Kaki <itskkpg@gmail.com> Discussion: https://postgr.es/m/CALj2ACXPvy4_LkQ0nHKgbZjAGK9fkDqRYUvXA3hgwxPm_X7Eng@mail.gmail.com Backpatch-through: 19 --- contrib/test_decoding/expected/repack.out | 7 +++++++ contrib/test_decoding/sql/repack.sql | 6 ++++++ doc/src/sgml/ref/repack.sgml | 6 ++++++ src/backend/commands/repack.c | 8 ++++++++ 4 files changed, 27 insertions(+) diff --git a/contrib/test_decoding/expected/repack.out b/contrib/test_decoding/expected/repack.out index 5ddc63238c5..5ed65399758 100644 --- a/contrib/test_decoding/expected/repack.out +++ b/contrib/test_decoding/expected/repack.out @@ -81,6 +81,13 @@ REPACK (CONCURRENTLY) repack_conc_unlogged; ERROR: cannot execute REPACK (CONCURRENTLY) on relation "repack_conc_unlogged" HINT: REPACK (CONCURRENTLY) is only allowed for permanent relations. DROP TABLE repack_conc_unlogged; +-- Doesn't support materialized views +CREATE MATERIALIZED VIEW repack_conc_matview AS SELECT 1 AS i; +CREATE UNIQUE INDEX ON repack_conc_matview (i); +REPACK (CONCURRENTLY) repack_conc_matview; +ERROR: cannot execute REPACK (CONCURRENTLY) on relation "repack_conc_matview" +DETAIL: This operation is not supported for materialized views. +DROP MATERIALIZED VIEW repack_conc_matview; -- Doesn't support tables with REPLICA IDENTITY NOTHING, even if they have a primary key CREATE TABLE repack_conc_replident (i int PRIMARY KEY); ALTER TABLE repack_conc_replident REPLICA IDENTITY NOTHING; diff --git a/contrib/test_decoding/sql/repack.sql b/contrib/test_decoding/sql/repack.sql index f461f5479f4..08e08fee686 100644 --- a/contrib/test_decoding/sql/repack.sql +++ b/contrib/test_decoding/sql/repack.sql @@ -59,6 +59,12 @@ CREATE UNLOGGED TABLE repack_conc_unlogged (i int PRIMARY KEY); REPACK (CONCURRENTLY) repack_conc_unlogged; DROP TABLE repack_conc_unlogged; +-- Doesn't support materialized views +CREATE MATERIALIZED VIEW repack_conc_matview AS SELECT 1 AS i; +CREATE UNIQUE INDEX ON repack_conc_matview (i); +REPACK (CONCURRENTLY) repack_conc_matview; +DROP MATERIALIZED VIEW repack_conc_matview; + -- Doesn't support tables with REPLICA IDENTITY NOTHING, even if they have a primary key CREATE TABLE repack_conc_replident (i int PRIMARY KEY); ALTER TABLE repack_conc_replident REPLICA IDENTITY NOTHING; diff --git a/doc/src/sgml/ref/repack.sgml b/doc/src/sgml/ref/repack.sgml index 0cb72b6b289..777681252ef 100644 --- a/doc/src/sgml/ref/repack.sgml +++ b/doc/src/sgml/ref/repack.sgml @@ -279,6 +279,12 @@ REPACK [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] USING </para> </listitem> + <listitem> + <para> + The relation is a materialized view. + </para> + </listitem> + <listitem> <para> The table is a system catalog or a <acronym>TOAST</acronym> table. diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c index 477c86b2ba6..b85d3efb3e6 100644 --- a/src/backend/commands/repack.c +++ b/src/backend/commands/repack.c @@ -907,6 +907,14 @@ check_concurrent_repack_requirements(Relation rel, Oid *ident_idx_p) errhint("%s is only allowed for permanent relations.", "REPACK (CONCURRENTLY)")); + /* A materialized view produces no logically decoded changes. */ + if (rel->rd_rel->relkind == RELKIND_MATVIEW) + ereport(ERROR, + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("cannot execute %s on relation \"%s\"", + "REPACK (CONCURRENTLY)", RelationGetRelationName(rel)), + errdetail_relkind_not_supported(rel->rd_rel->relkind)); + /* * With NOTHING, WAL does not contain the old tuple; FULL is not yet * supported. -- 2.47.3
^ permalink raw reply [nested|flat] 9+ messages in thread

* Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views
  2026-08-29 15:58 REPACK (CONCURRENTLY) fails with wrong error for materialized views Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
  2026-08-31 20:41 ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Álvaro Herrera <alvherre@kurilemu.de>
  2026-08-31 20:50   ` Re: REPACK (CONCURRENTLY) fails with wrong error for materialized views Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
@ 2026-09-09 11:02     ` Álvaro Herrera <alvherre@kurilemu.de>
  1 sibling, 0 replies; 9+ messages in thread

From: Álvaro Herrera @ 2026-09-09 11:02 UTC (permalink / raw)
  To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>; +Cc: pgsql-hackers; Nathan Bossart <nathandbossart@gmail.com>; Kiran Kaki <itskkpg@gmail.com>

On 2026-Aug-31, Bharath Rupireddy wrote:

> Thoughts?

Hello, thanks, I have pushed this.  I removed the CREATE INDEX from the
test case though, because it's not needed: the new error fires before
even trying to find the index.  I also moved to the start of the list
the documentation addition: the new sentence was the only "the relation
is ..." in the midst of a bunch of "the table is ..." statements, so it
felt out of place.  And I made it "the relation is not a table" instead
(with a parenthical comment mentioning a matview), so that all the
others "the table is ..." make sense as followups to it.

Thanks!

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
Subversion to GIT: the shortest path to happiness I've ever heard of
                                                (Alexey Klyukin)






^ permalink  raw  reply  [nested|flat] 9+ messages in thread


end of thread, other threads:[~2026-09-09 11:02 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-08-29 15:58 REPACK (CONCURRENTLY) fails with wrong error for materialized views Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2026-08-29 20:42 ` Kiran Kaki <itskkpg@gmail.com>
2026-08-31 16:11   ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2026-08-31 20:21     ` Kiran Kaki <itskkpg@gmail.com>
2026-08-31 20:31       ` Kiran Kaki <itskkpg@gmail.com>
2026-08-31 20:41 ` Álvaro Herrera <alvherre@kurilemu.de>
2026-08-31 20:50   ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2026-08-31 21:29     ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2026-09-09 11:02     ` Álvaro Herrera <alvherre@kurilemu.de>

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