pgsql: Fix assertion failure in check_new_partition_bound().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix assertion failure in check_new_partition_bound().
Date: 2020-10-30 21:01:06
Message-ID: E1kYbWE-0003QQ-AI@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix assertion failure in check_new_partition_bound().

Commit 6b2c4e59d was overly confident about not being able to see
a negative cmpval result from partition_range_bsearch(). Adjust
the code to cope with that.

Report and patch by Amul Sul; some additional cosmetic changes by me

Discussion: https://postgr.es/m/CAAJ_b97WCO=EyVA7fKzc86kKfojHXLU04_zs7-7+yVzm=-1QkQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/970c05057593c2f5919a69b43fd917c4fa86f51c

Modified Files
--------------
src/backend/partitioning/partbounds.c | 40 +++++++++++++++---------------
src/test/regress/expected/create_table.out | 4 +++
src/test/regress/sql/create_table.sql | 1 +
3 files changed, 25 insertions(+), 20 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Noah Misch 2020-10-31 15:52:07 pgsql: Reproduce debug_query_string==NULL on parallel workers.
Previous Message Heikki Linnakangas 2020-10-30 17:31:23 pgsql: Fix missing validation for the new GiST sortsupport functions.