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: Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Speeding up INSERTs and UPDATEs to partitioned tables
Date: 2018-11-12 23:17:39
Message-ID: CAKJS1f81q2yztfgEnUYN89h44-z2_pk8GuPiqp1vNG_fvyYzog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9 November 2018 at 19:18, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> I have a comment regarding how you chose to make
> PartitionTupleRouting private.
>
> Using the v14_to_v15 diff, I could quickly see that there are many diffs
> changing PartitionTupleRouting to struct PartitionTupleRouting, but they
> would be unnecessary if you had added the following in execPartition.h, as
> my upthread had done.
>
> -/* See execPartition.c for the definition. */
> +/* See execPartition.c for the definitions. */
> typedef struct PartitionDispatchData *PartitionDispatch;
> +typedef struct PartitionTupleRouting PartitionTupleRouting;

Okay, done that way. v16 attached.

The 0002 patch is included again, this time with a new proposed commit
message. There was some discussion over on [1] where nobody seemed to
have any concerns about delaying the locking until we route the first
tuple to the partition.

[1] https://www.postgresql.org/message-id/25C1C6B2E7BE044889E4FE8643A58BA963B5796B@G01JPEXMBKW03

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

Attachment Content-Type Size
v16-0001-Speed-up-INSERT-and-UPDATE-on-partitioned-tables.patch application/octet-stream 71.8 KB
v16-0002-Delay-locking-of-partitions-during-INSERT-and-UP.patch application/octet-stream 4.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2018-11-12 23:46:50 Re: Support custom socket directory in pg_upgrade
Previous Message Tom Lane 2018-11-12 23:07:20 Re: [Bug Fix]ECPG: cancellation of significant digits on ECPG