| From: | Clemenza Zhang <zxlmgsps2(at)gmail(dot)com> |
|---|---|
| To: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
| Cc: | Matthias van de Meent <boekewurm(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Eisentraut <peter(at)eisentraut(dot)org> |
| Subject: | Re: Bug: Whole-row var in indexes corrupts indexes after DDL |
| Date: | 2026-09-08 09:23:30 |
| Message-ID: | CAL9_+FHyTXatQCbO34wVxuZ=SmB97sfgBz1ueXQG-HtqGYiJMg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Matthias,
I tested v3 locally against current master.
For the original reproducer, I can reproduce the problem on unpatched
master. With v3 applied, the original case passes and the whole-row
dependent index is rebuilt as expected.
I also tested the combined ADD COLUMN / DROP COLUMN case discussed
earlier in the thread. With v3 alone, I can reproduce the known
```
ERROR: cache lookup failed for index ...
```
failure. With CF 6121 v6 applied before CF 7071 v3, the cache lookup
failure is gone.
I also verified the object-address round-trip case reported by Andrey:
```
WITH a AS (
SELECT *
FROM pg_identify_object_as_address(
'pg_class'::regclass, 'wr_multi'::regclass, -32768)
)
SELECT pg_get_object_address(type, object_names, object_args)
FROM a;
```
With CF 6121 v6 and CF 7071 v3 applied, this still fails with:
```
ERROR: unrecognized object type "table whole row"
```
So my current testing confirms that v3 fixes the original whole-row
index corruption case. The combined ALTER TABLE failure is resolved
when the prerequisite cleanup fix is applied, while the object-address
round-trip issue remains.
I'll continue with some additional testing around combinations of
row-shape-changing DDL and whole-row dependent objects and report
anything new I find.
Regards,
Clemenza
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Chao Li | 2026-09-08 09:14:56 | Fix inherited constraint loss in ALTER COLUMN SET EXPRESSION |