Re: inserts into partitioned table may cause crash - Mailing list pgsql-hackers

From Amit Langote
Subject Re: inserts into partitioned table may cause crash
Date
Msg-id 0ac1d841-e189-be1a-06b9-93681387e7fe@lab.ntt.co.jp
Whole thread Raw
In response to Re: inserts into partitioned table may cause crash  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
List pgsql-hackers
On 2018/03/14 17:35, Etsuro Fujita wrote:
> (2018/03/14 17:25), Etsuro Fujita wrote:
>> (2018/03/14 14:54), Amit Langote wrote:
>>> Sorry that this may be nitpicking that I should've brought up before, but
>>> doesn't ExecPrepareTupleRouting do all the work that's needed for routing
>>> a tuple and hence isn't the name a bit misleading? Maybe,
>>> ExecPerformTupleRouting?
>>
>> Actually, I thought of that name as a candidate, too. But I used
>> ExecPrepareTupleRouting because I didn't think it would actually perform
>> all the work; because it wouldn't do the main work of routing, ie, route
>> an inserted tuple to the target partition, which is ExecInsert()'s job.
>> I agree that it would do all the work *needed for routing*, though.
> 
> One thing to add: having said that, I don't have any strong opinion about
> that.  How about leaving that for the committer?

Sure.  I agree with your point that "routing" isn't finished in that
function if we also consider actual insertion of tuple into the selected
partition a part of it.

Thanks,
Amit




pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: inserts into partitioned table may cause crash
Next
From: Etsuro Fujita
Date:
Subject: Incorrect comment for ExecProcessReturning