Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY
Date
Msg-id aTYNyPELpDeNAHLc@paquier.xyz
Whole thread Raw
In response to Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY  (Álvaro Herrera <alvherre@kurilemu.de>)
List pgsql-hackers
On Sun, Dec 07, 2025 at 10:07:45PM +0100, Alvaro Herrera wrote:
> Hmm, as I recall it's quite intentional that the index on a partitioned
> table is marked !indisvalid; such indexes are only supposed to be marked
> valid once indexes on all partitions have been attached.  As I recall,
> if you remove that prohibition, some pg_dump scenarios fail.

Right.  If indisvalid is true on a partitioned table, then we are sure
that all its partitions have valid indexes.  If indisvalid is false,
some of its partitions may have an invalid index.  In the false case,
things can be a bit lossy as well.  For example, an ALTER TABLE ONLY
could switch a partition's indisvalid to be true, without switching to
true the indisvalid of its partitioned table.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Fix incorrect comments in tuplesort.c
Next
From: Mahmoud Ayman
Date:
Subject: Re: [PATCH] psql: add size-based sorting options (O/o) for tables and indexes