From: Etsuro Fujita <efujita@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix yet another issue with step generation in partition pruning.
Date: Fri, 07 Aug 2020 05:49:07 +0000
Message-ID: <E1k3vFb-0007Jg-5a@gemulon.postgresql.org> (raw)
Fix yet another issue with step generation in partition pruning.
Commit 13838740f fixed some issues with step generation in partition
pruning, but there was yet another one: get_steps_using_prefix() assumes
that clauses in the passed-in prefix list are sorted in ascending order
of their partition key numbers, but the caller failed to ensure this for
range partitioning, which led to an assertion failure in debug builds.
Adjust the caller function to arrange the clauses in the prefix list in
the required order for range partitioning.
Back-patch to v11, like the previous commit.
Patch by me, reviewed by Amit Langote.
Discussion: https://postgr.es/m/CAPmGK16jkXiFG0YqMbU66wte-oJTfW6D1HaNvQf%3D%2B5o9%3Dm55wQ%40mail.gmail.com
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/79a3ab1e98d6b5952e29ad91e07c0e9fc777cc0b
Modified Files
--------------
src/backend/partitioning/partprune.c | 138 +++++++++++++++-----------
src/test/regress/expected/partition_prune.out | 10 ++
src/test/regress/sql/partition_prune.sql | 5 +
3 files changed, 96 insertions(+), 57 deletions(-)
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: Fix yet another issue with step generation in partition pruning.
In-Reply-To: <E1k3vFb-0007Jg-5a@gemulon.postgresql.org>
References: <E1k3vFb-0007Jg-5a@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