From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix bogus logic for reporting which hash partition conflicts.
Date: Tue, 29 Jun 2021 18:34:49 +0000
Message-ID: <E1lyIZN-0001T1-Ns@gemulon.postgresql.org> (raw)
Fix bogus logic for reporting which hash partition conflicts.
Commit efbfb6424 added logic for reporting exactly which existing
partition conflicts when complaining that a new hash partition's
modulus isn't compatible with the existing ones. However, it
misunderstood the partitioning data structure, and would select
the wrong partition in some cases, or crash outright due to fetching
a bogus table OID in other cases.
Per bug #17076 from Alexander Lakhin. Fix by Amit Langote;
some further work on the code comments by me.
Discussion: https://postgr.es/m/17076-89a16ae835d329b9@postgresql.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/dd2364ced98553e0217bfe8f621cd4b0970db74a
Modified Files
--------------
src/backend/partitioning/partbounds.c | 26 ++++++++++++++++++--------
src/test/regress/expected/create_table.out | 10 ++++++++--
src/test/regress/sql/create_table.sql | 3 +++
3 files changed, 29 insertions(+), 10 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: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Fix bogus logic for reporting which hash partition conflicts.
In-Reply-To: <E1lyIZN-0001T1-Ns@gemulon.postgresql.org>
References: <E1lyIZN-0001T1-Ns@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