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-10-05 12:55:34
Message-ID: CAKJS1f_Vt8q2WYSKBwZR0ucuCTXDz0uZh_EUMWQHOqe8EcVyig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 17 September 2018 at 21:15, David Rowley
<david(dot)rowley(at)2ndquadrant(dot)com> wrote:
> v9 patch attached. Fixes conflict with 6b78231d.

v10 patch attached. Fixes conflict with cc2905e9.

I'm not so sure we need to zero the partition_tuple_slots[] array at
all since we always set a value there is there's a corresponding map
stored. I considered pulling that out, but in the end, I didn't as I
saw some Asserts checking it's been properly set by checking the
element != NULL in nodeModifyTable.c and copy.c. Perhaps I should
have just gotten rid of those Asserts along with the palloc0 and
subsequent memset after the expansion of the array. I'm undecided.

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

Attachment Content-Type Size
v10-0001-Speed-up-INSERT-and-UPDATE-on-partitioned-tables.patch application/octet-stream 64.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2018-10-05 13:26:27 Re: automatic restore point
Previous Message Jesper Pedersen 2018-10-05 12:22:49 Re: partition tree inspection functions