Re: Unexpected reindex when altering column types for partitioned tables - Mailing list pgsql-hackers

From Álvaro Rodríguez
Subject Re: Unexpected reindex when altering column types for partitioned tables
Date
Msg-id CA+C_kKVngP6=aT_5pU1BN67fzCu82b16ZMy42NW75qdNqptJuw@mail.gmail.com
Whole thread
In response to Re: Unexpected reindex when altering column types for partitioned tables  (Álvaro Herrera <alvherre@kurilemu.de>)
Responses Re: Unexpected reindex when altering column types for partitioned tables
List pgsql-hackers
Added to CF, thanks Álvaro!

On Fri, Jun 12, 2026 at 3:03 PM Álvaro Herrera <alvherre@kurilemu.de> wrote:
>
> Hi,
>
> On 2026-Jun-08, Álvaro Rodríguez wrote:
>
> > When running the ALTER TABLE ALTER COLUMN TYPE operation, certain type
> > changes are supposed to not require a reindex. For example, text to
> > varchar or varchar(n) to varchar(m) when m > n. However, this turns
> > out to not be the case for indexes (including pk / unique constraints)
> > on partitioned tables. Patch 0001 (attached) demonstrates this
> > behavior with a new regression test. In this case, the table rewrite
> > is avoided but the indexes are rebuilt.
>
> I agree with the problem statement, and I think the proposed solution
> has the right shape.  This obviously has to be kept for pg20, so let's
> discuss further during the next commitfest; please create a CF entry for
> it.
>
> Thanks,
>
> --
> Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication
Next
From: Tatsuya Kawata
Date:
Subject: Re: [PATCH] Change wait_time column of pg_stat_lock to double precision