Re: tablecmds: fix bug where index rebuild loses replica identity on partitions

From: Álvaro Rodríguez <alvaro(at)datadoghq(dot)com>
To: Sami Imseih <samimseih(dot)pg(at)gmail(dot)com>
Cc: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
Subject: Re: tablecmds: fix bug where index rebuild loses replica identity on partitions
Date: 2026-10-06 11:37:09
Message-ID: CA+C_kKWVb5PrrGJM5Bd4rPsf-V=h20xoeCHMtPy3WCYy4=YwUQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

I have been working on another patch [0] and was pointed to this
thread. My changes are focused on avoiding preventable rebuilds of the
leaf indexes on partitioned tables, when we do ALTER TABLE ALTER
COLUMN TYPE. I change the order in which indexes are processed and do
some other minor changes to ensure that they are correctly remembered
on rebuild.

I believe commit 0003 here addresses a subset of the issues that my
patch fixes. To validate, I have combined 0001 + 0002 + my patch +
0003's tests and the tests seem to be passing (the only change in test
output is the at_partitioned test, where I get the storage changes
that my patch is fixing). Commits 0001 and 0002 are not addressed by
my patch at all, as far as I can tell. I wonder if it's worth joining
efforts!

Best,
Álvaro

[0] https://www.postgresql.org/message-id/flat/CA%2BC_kKX9Qk0JQZ%2BbjyHWNiCBLYN4kyCRdJoJ%2Bgtr1K2%2BXjo55g%40mail.gmail.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias van de Meent 2026-10-06 11:48:57 Re: Exploring pass-by-value for small Bitmapset sets
Previous Message Zhijie Hou 2026-10-06 11:27:27 Re: Parallel Apply