pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Add null test to partition constraint for default range partitio
Date: Tue, 28 Nov 2017 15:51:06 +0000
Message-ID: <E1eJiA6-0001uy-GA@gemulon.postgresql.org> (raw)

Add null test to partition constraint for default range partitions.

Non-default range partitions have a constraint which include null
tests, and both default and non-default list partitions also have a
constraint which includes null tests, but for some reason this was
missed for default range partitions.  This could cause the partition
constraint to evaluate to false for rows that were (correctly) routed
to that partition by insert tuple routing, which could in turn
cause constraint exclusion to prune the default partition in cases
where it should not.

Amit Langote, reviewed by Kyotaro Horiguchi

Discussion: http://postgr.es/m/ba7aaeb1-4399-220e-70b4-62eade1522d0@lab.ntt.co.jp

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7b88d63a9122646ead60c1afffc248a31d4e457d

Modified Files
--------------
src/backend/catalog/partition.c       | 29 ++++++++++++++++++++-----
src/test/regress/expected/inherit.out | 41 +++++++++++++++++++++++------------
src/test/regress/expected/update.out  |  2 +-
src/test/regress/sql/inherit.sql      |  9 ++++----
4 files changed, 56 insertions(+), 25 deletions(-)



Message-ID: <E1eJiA6-0001uy-GA@gemulon.postgresql.org>
Permalink:  ../E1eJiA6-0001uy-GA@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eJiA6-0001uy-GA@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: rhaas@postgresql.org
  Subject: Re: pgsql: Add null test to partition constraint for default range partitio
  In-Reply-To: <E1eJiA6-0001uy-GA@gemulon.postgresql.org>
  References: <E1eJiA6-0001uy-GA@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