Re: Speeding up INSERTs and UPDATEs to partitioned tables

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Speeding up INSERTs and UPDATEs to partitioned tables
Date: 2018-11-01 00:35:30
Message-ID: 206ee75f-2120-c63a-945c-ff3644305177@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018/11/01 8:58, David Rowley wrote:
> On 1 November 2018 at 06:45, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> On Wed, Aug 22, 2018 at 8:30 AM David Rowley
>> <david(dot)rowley(at)2ndquadrant(dot)com> wrote:
>>> On 22 August 2018 at 19:08, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>>>> +#define PartitionTupRoutingGetToParentMap(p, i) \
>>>> +#define PartitionTupRoutingGetToChildMap(p, i) \
>>>>
>>>> If the "Get" could be replaced by "Child" and "Parent", respectively,
>>>> they'd sound more meaningful, imho.
>>>
>>> I did that to save 3 chars. I think putting the additional
>>> Child/Parent in the name is not really required. It's not as if we're
>>> going to have a ParentToParent or a ChildToChild map, so I thought it
>>> might be okay to assume that if it's "ToParent", that it's being
>>> converted from the child and "ToChild" seems safe to assume it's being
>>> converted from the parent. I can change it though if you feel very
>>> strongly that what I've got is no good.
>>
>> I'm not sure exactly what is best here, but it seems to unlikely to me
>> that somebody is going to read that macro name and think, oh, that
>> means "get the to-parent map". They are more like be confused by the
>> juxtaposition of "get" and "to".
>>
>> I think a better way to shorten the name would be to truncate the
>> PartitionTupRouting() prefix in some way, e.g. dropping TupRouting.
>
> Thanks for chipping in on this.
>
> I agree. I don't think "TupRouting" really needs to be in the name.
> Probably "To" can also just become "2" and we can put back the
> Parent/Child before that.

Agree that "TupRouting" can go, but "To" is not too long for using "2"
instead of it.

Thanks,
Amit

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-11-01 00:38:35 Re: Is there way to detect uncommitted 'new table' in pg_class?
Previous Message Michael Paquier 2018-11-01 00:34:05 Re: replication_slots usability issue