Re: default partition and concurrent attach partition

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, hawu(at)vmware(dot)com
Subject: Re: default partition and concurrent attach partition
Date: 2020-09-07 22:10:07
Message-ID: 20200907221007.GA14218@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-Sep-07, Alvaro Herrera wrote:

> Well, they are fake in that the ri_RangeTableIndex they carry is bogus,
> which means that ExecBuildSlotValueDescription will misbehave if the
> partitioned default partition has a different column order than its
> parent. That can be evidenced by changing the setup block in the
> isolation test as in the attached; and you'll get an undesirable error
> like this:
>
> 2020-09-07 19:00:49.513 -03 [12981] ERROR: attribute 2 of type record has wrong type
> 2020-09-07 19:00:49.513 -03 [12981] DETAIL: Table has type text, but query expects integer.
> 2020-09-07 19:00:49.513 -03 [12981] STATEMENT: insert into attach_tab values (110, 'eleven and five twenties');

... and I sent before completing. I'm not sure what a good fix for this
is. We could try to initialize the resultRelInfo honestly, or we could
set ri_RangeTableIndex to some invalid value that will ... eh ... do
something else.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-09-07 22:35:45 Re: default partition and concurrent attach partition
Previous Message Alvaro Herrera 2020-09-07 22:05:41 Re: default partition and concurrent attach partition