On 2026-Jun-18, solai v wrote: > After applying the patch i repeated the same test. > PostgreSQL correctly rejected the operation with > ERROR: cannot use index "t_idx" as replica identity > DETAIL: The constraint "id_nn" on column "id" is marked NOT VALID. > HINT: You might need to validate it using ALTER TABLE ... VALIDATE CONSTRAINT. > > This matches the expected behavior,
I agree. I have pushed it now to all three branches. The only problem left (famous last words!) on this at this point is that somebody could have an instance in 18 where the replica identity has already been set to an index with an invalid not-null, and they might only find out when they try to pg_upgrade to 19 or 20 and it fails in the middle of the upgrade. Would you be interested in patching pg_upgrade so that it detects this problem during --check and reports it there? Thanks -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Ellos andaban todos desnudos como su madre los parió, y también las mujeres, aunque no vi más que una, harto moza, y todos los que yo vi eran todos mancebos, que ninguno vi de edad de más de XXX años" (Cristóbal Colón)
