RE: The follwing error sometimes happened while updating partitioned table using inheritance; ERROR: attribute xxx of type record has wrong type

From: "ideriha(dot)takeshi(at)fujitsu(dot)com" <ideriha(dot)takeshi(at)fujitsu(dot)com>
To: 'Amit Langote' <amitlangote09(at)gmail(dot)com>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: RE: The follwing error sometimes happened while updating partitioned table using inheritance; ERROR: attribute xxx of type record has wrong type
Date: 2022-01-28 10:51:27
Message-ID: TYCPR01MB704195AAABCC36433438BCA2EA229@TYCPR01MB7041.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Amit,

>Thanks for the report.
>
>This looks to me like a bug of inheritance_planner() that is used for planning inherited UPDATEs till v13.

Thank you for the quick response and detailed explanation!
I'm not familiar with source code around planner, so I really appreciate that.

> adjust_appendrel_attrs() simply copies any Params it finds in the original tree as-is by way of expression_tree_mutator(), though perhaps it should add new ones that refer to the child plan. I'll take a shot at that.

If you work on this, it'd be wonderful because this issue actually occurred in one of my client's system.
(Of course, SQL I wrote is not actual one.)

Best regards,
Takeshi Ideriha

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2022-01-28 13:41:53 BUG #17386: btree index corruption after reindex concurrently on write heavy table
Previous Message PG Bug reporting form 2022-01-28 09:07:40 BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end