public inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix SPLIT PARTITION hint for DEFAULT partition bounds
Date: Tue, 19 May 2026 10:55:08 +0000
Message-ID: <E1wPI6O-000GEr-2U@gemulon.postgresql.org> (raw)

Fix SPLIT PARTITION hint for DEFAULT partition bounds

When ALTER TABLE ... SPLIT PARTITION specifies a DEFAULT partition, the
explicit partitions do not need to cover the split partition's bound
exactly.  They may cover only part of it, with the DEFAULT partition
covering the remaining range.

However, the existing hint said that the combined bounds of the new
partitions must exactly match the bound of the split partition, which is
misleading for this case and inconsistent with the code comment.

Fix the hint to state the actual requirement: explicit partition bounds
must stay within the bounds of the split partition when a DEFAULT
partition is specified.

Author: Chao Li <lic@highgo.com>
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
Discussion: https://postgr.es/m/C18878AB-DEB2-4A61-9995-A035DD644B81@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/971017c49599b6666029ca46ee00378d8836f336

Modified Files
--------------
src/backend/partitioning/partbounds.c         | 14 ++++++--------
src/test/regress/expected/partition_split.out | 14 +++++++-------
2 files changed, 13 insertions(+), 15 deletions(-)



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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: akorotkov@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix SPLIT PARTITION hint for DEFAULT partition bounds
  In-Reply-To: <E1wPI6O-000GEr-2U@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox