Re: update tuple routing and triggers

2018-02-08 Thread Amit Langote
On 2018/02/09 4:31, Robert Haas wrote: > On Wed, Feb 7, 2018 at 8:26 PM, Amit Langote > wrote: >> OK, done in the attached. > > Committed. Thanks. Thank you. Sorry, missed renaming leafrel that you did yourself. Regards, Amit

Re: update tuple routing and triggers

2018-02-08 Thread Robert Haas
On Wed, Feb 7, 2018 at 8:26 PM, Amit Langote wrote: > OK, done in the attached. Committed. Thanks. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: update tuple routing and triggers

2018-02-07 Thread Amit Langote
Thanks for the review. On 2018/02/08 0:04, Robert Haas wrote: > On Tue, Feb 6, 2018 at 12:52 AM, Amit Langote > wrote: >> About renaming es_leaf_result_relations to >> es_tuple_routing_result_relations, I will defer that to committer. But on >> second though,

Re: update tuple routing and triggers

2018-02-07 Thread Robert Haas
On Tue, Feb 6, 2018 at 12:52 AM, Amit Langote wrote: > About renaming es_leaf_result_relations to > es_tuple_routing_result_relations, I will defer that to committer. But on > second though, maybe we don't need to make this patch larger than it has > to be. +1 for

Re: update tuple routing and triggers

2018-02-05 Thread Amit Langote
On 2018/02/06 13:56, Amit Khandekar wrote: > I was wondering whether the same duplicate result rels issue can arise > for es_root_result_relations and es_result_relations. But I think for > inserts, es_root_result_relations is NULL, and for updates, these two > lists always have distinct set of

Re: update tuple routing and triggers

2018-02-05 Thread Amit Langote
Thank you both for the review. I updated the comment in ExecSetupPartitionTupleRouting considering the point both of you raised. About renaming es_leaf_result_relations to es_tuple_routing_result_relations, I will defer that to committer. But on second though, maybe we don't need to make this

Re: update tuple routing and triggers

2018-02-05 Thread Etsuro Fujita
(2018/02/06 11:38), Amit Langote wrote: On 2018/02/06 10:48, Amit Langote wrote: When working on this, I wondered if the es_leaf_result_relations should actually be named something like es_tuple_routing_result_rels, to denote the fact that they're created by tuple routing code. The current

Re: update tuple routing and triggers

2018-02-05 Thread Amit Langote
On 2018/02/06 10:48, Amit Langote wrote: > When working on this, I wondered if the es_leaf_result_relations should > actually be named something like es_tuple_routing_result_rels, to denote > the fact that they're created by tuple routing code. The current name > might lead to someone thinking

update tuple routing and triggers

2018-02-05 Thread Amit Langote
Hi. Fujita-san pointed out in a nearby thread [1] that EXPLAIN ANALYZE shows duplicate stats for partitions' triggers. Example: create table p (a int) partition by list (a); create table p1 partition of p for values in (1); create table p2 partition of p for values in (2); create table p3