Re: Speeding up INSERTs and UPDATEs to partitioned tables

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Speeding up INSERTs and UPDATEs to partitioned tables
Date: 2018-08-21 05:44:36
Message-ID: CAKJS1f-aGCJ5H7_hiSs5PhWs6Obmj+vGARjGymqH1=o5PcrNnQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3 August 2018 at 17:58, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> On 2018/07/31 16:03, David Rowley wrote:
>> Maybe we can do that as a follow-on patch.
>
> We probably could, but I think it would be a good idea get rid of *all*
> redundant allocations due to tuple routing in one patch, if that's the
> mission of this thread and the patch anyway.

I started looking at this patch today and I now agree that it should
be included in the main patch.

I changed a few things with the patch. For example, the map access
macros you'd defined were not in CamelCase. I also fixed a bug where
the child to parent map was not being initialised when on conflict
transition capture was required. I added a test which was crashing the
backend but fixed the code so it works correctly. I also got rid of
the child_parent_map_not_required array since we now no longer need
it. The code now always initialises the maps in cases where they're
going to be required.

I've attached a v3 version of your patch and also v6 of the main patch
which includes the v3 patch.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
v3_Refactor-handling-of-child_parent_tupconv_maps.patch application/octet-stream 14.2 KB
v6-0001-Speed-up-INSERT-and-UPDATE-on-partitioned-tables.patch application/octet-stream 62.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Gierth 2018-08-21 05:47:47 Re: A really subtle lexer bug
Previous Message Tatsuro Yamada 2018-08-21 03:57:11 Re: Fix help option of contrib/oid2name