Re: [HACKERS] transition table behavior with inheritance appearsbroken (was: Declarative partitioning - another take) - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: [HACKERS] transition table behavior with inheritance appearsbroken (was: Declarative partitioning - another take)
Date
Msg-id CACjxUsN1P_YMhyU74MdpKeMgV+UwxESi1HotLtT75723dt5g=g@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] transition table behavior with inheritance appearsbroken (was: Declarative partitioning - another take)  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Responses Re: [HACKERS] transition table behavior with inheritance appearsbroken (was: Declarative partitioning - another take)  (Thomas Munro <thomas.munro@enterprisedb.com>)
[HACKERS] Re: transition table behavior with inheritance appears broken (was:Declarative partitioning - another take)  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
On Thu, May 18, 2017 at 5:16 AM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:

> Do we need to update documentation?  Perhaps, some clarification on the
> inheritance/partitioning behavior somewhere.

Yeah, I think so.

> -    Assert((enrmd->reliddesc == InvalidOid) != (enrmd->tupdesc == NULL));
> +    Assert((enrmd->reliddesc == InvalidOid) !=
> +           (enrmd->tupdesc == NULL));
>
> Perhaps, unintentional change?

Agreed; line is not long enough to need to wrap.

> I'm not sure if it's significant for transition tables, but what if a
> partition's BR trigger modified the tuple?  Would we want to include the
> modified version of the tuple in the transition table or the original as
> the patch does?  Same for the code in CopyFrom().

Good spot!  If the BR trigger on the child table modifies or
suppresses the action, I strongly feel that must be reflected in the
transition table.  This needs to be fixed.

--
Kevin Grittner
VMware vCenter Server
https://www.vmware.com/



pgsql-hackers by date:

Previous
From: Sveinn Sveinsson
Date:
Subject: [HACKERS] Re: [BUGS] BUG #14657: Server process segmentation fault in v10, May10th dev snapshot
Next
From: Surafel Temesgen
Date:
Subject: Re: [HACKERS] Disallowing multiple queries per PQexec()