On Tue Jul 28, 2026 at 1:11 AM CEST, Sami Imseih wrote:
>> Also, this issue is not limited to replica identity. CLUSTER ON does
>> not copy/restore indisclustered on partition indexes at all, and this
>> should be addressed as well, right?
>
> Robert (cc'd) reminded me offline that REPACK ... USING INDEX ==
> CLUSTER ON.

Hi Sami,

have you seen my email from a few days ago?

https://www.postgresql.org/message-id/DK5H6VM4U4J4.C8APP2ZH2CAT%40gmail.com

I'm pretty sure the root cause is not addressed by patch v9.

If my analysis is correct (RememberIndexForRebuilding not being called
on the child index because of an earlier drop), that would also explain
the issues with CLUSTER (As RememberIndexForRebuilding calls both
RememberReplicaIdentityForRebuilding and
RememberClusterOnForRebuilding).

In that case, rather than tracking and restoring more state, I think a
better fix would be to make sure that ATPostAlterTypeCleanup doesn't
find the child table in a half-cleaned-up state. Then
RememberIndexForRebuilding would be called and the replica identity and
cluster state would be restored correctly.


Regards,

Alberto

-- 
Alberto Piai
Sensational AG
Zürich, Switzerland


Reply via email to