pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Etsuro Fujita <efujita@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid redundant checks in partition_bounds_copy().
Date: Fri, 21 Feb 2020 11:03:49 +0000
Message-ID: <E1j5661-0000nM-Ks@gemulon.postgresql.org> (raw)

Avoid redundant checks in partition_bounds_copy().

Previously, partition_bounds_copy() checked whether the strategy for the
given partition bounds was hash or not, and then determined the number of
elements in the datums in the datums array for the partition bounds, on
each iteration of the loop for copying the datums array, but there is no
need to do that.  Perform the checks only once before the loop iteration.

Author: Etsuro Fujita
Reported-by: Amit Langote and Julien Rouhaud
Discussion: https://postgr.es/m/CAPmGK14Rvxrm8DHWvCjdoks6nwZuHBPvMnWZ6rkEx2KhFeEoPQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/032f9ae012d87c730be0e261a6bae9323c2b2d6c

Modified Files
--------------
src/backend/partitioning/partbounds.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)



Message-ID: <E1j5661-0000nM-Ks@gemulon.postgresql.org>
Permalink:  ../E1j5661-0000nM-Ks@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1j5661-0000nM-Ks@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: efujita@postgresql.org
  Subject: Re: pgsql: Avoid redundant checks in partition_bounds_copy().
  In-Reply-To: <E1j5661-0000nM-Ks@gemulon.postgresql.org>
  References: <E1j5661-0000nM-Ks@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox