Re: transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Kevin Grittner <kgrittn(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, David Fetter <david(at)fetter(dot)org>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers-owner(at)postgresql(dot)org
Subject: Re: transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)
Date: 2017-05-17 07:42:03
Message-ID: CAEepm=0C=BZCE+eUtL7uaMK=1-epv7dP6+g3cr8NLUvP=0xnUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 17, 2017 at 6:04 PM, Amit Langote
<Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> On 2017/05/17 11:22, Thomas Munro wrote:
>> Here is that patch. Thoughts?
>
> I looked at the patch and noticed that there might be some confusion about
> what's in the EState.es_root_result_relations array.

Thanks for looking at this!

> ...
>
> targetRelInfo should instead be set to mtstate->rootResultRelInfo that was
> set in ExecInitModifyTable() as described above, IOW, as follows:
>
> /* Partitioned table. */
> if (mtstate->rootResultRelInfo != NULL)
> targetRelInfo = mtstate->rootResultRelInfo;

Ah, I see. Thank you. Fixed in the attached.

--
Thomas Munro
http://www.enterprisedb.com

Attachment Content-Type Size
transition-tuples-from-child-tables-v5.patch application/octet-stream 54.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message amul sul 2017-05-17 08:37:44 Re: [POC] hash partitioning
Previous Message Tsunakawa, Takayuki 2017-05-17 07:38:56 Re: [bug fix] Savepoint-related statements terminates connection