| From: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
|---|---|
| To: | Matthias van de Meent <boekewurm(at)gmail(dot)com> |
| Cc: | 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-04 18:16:23 |
| Message-ID: | F4161B2A-79DC-453A-BCE1-4A22139B0664@yandex-team.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Matthias,
I found one remaining issue in the object-address changes in v2/v3.
pg_identify_object_as_address() does not produce a value that can be
passed back to pg_get_object_address():
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;
ERROR: unrecognized object type "table whole row"
The documentation describes these functions as inverses. I think we
either need to make "table whole row" an addressable object type, or use
another representation that pg_get_object_address() already understands.
This case would also make a useful addition to the object_address test.
The RTE_FUNCTION reproducer works for me with v2.
On Mon, Aug 31, 2026 at 2:39 PM Matthias van de Meent wrote:
> I think the issue can and should be solved separately from this patch
Agreed. Jian's v6 in the linked thread [0] seems to provide the prerequisite
fix. The combined ADD COLUMN/DROP COLUMN reproducer still fails on v2
alone, so that fix needs to go in first or precede this patch in the
series.
I also agree that rejecting whole-row partition keys can be a separate
change, and that checking the relfilenode change is sufficient here. I
don't suspect a separate problem in the normal index rebuild machinery.
> I think these attached reproducers were dropped somewhere along the way.
Oops, sorry, I missed the file. PFA. Nothing really useful though beyond
what you already fixed or must be fixed elsewhere.
RememberWholeRowDependentForRebuilding() is a void function, but:
+ return RememberAllDependentForRebuilding(tab, subtype, rel,
I think you can just call RememberAllDependentForRebuilding() without a
return.
Thank you!
Best regards, Andrey Borodin.
[0] https://postgr.es/m/CACJufxFD-LGP1Ccj58d4WgGAoq-+N1fwQkA=b5u5PQf_65Vo9A@mail.gmail.com
| Attachment | Content-Type | Size |
|---|---|---|
| wr-review.sql | application/octet-stream | 2.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Noah Misch | 2026-09-04 18:07:12 | Re: CREATE SCHEMA ... CREATE DOMAIN support |