Re: RANGE partition pruning can still exclude the default partition

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Ewan Young <kdbase(dot)hack(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Jacob Brazeal <jacob(dot)brazeal(at)gmail(dot)com>, Tender Wang <tndrwang(at)gmail(dot)com>, amitlan(at)postgresql(dot)org
Subject: Re: RANGE partition pruning can still exclude the default partition
Date: 2026-09-18 05:21:05
Message-ID: CAApHDvr=vpLEED1fxtBgbdyud40kxHczSKOFUG23hnizE9jBfQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 18 Sept 2026 at 15:01, Ewan Young <kdbase(dot)hack(at)gmail(dot)com> wrote:
> v3 looks good to me. The nvalues == 1 restriction on the first-key
> MINVALUE/MAXVALUE trim is a clear improvement: the leading single-key
> step already trims the default there, and the BTEqualStrategyNumber
> block handles the multi-key prefixes, so the intersection removes the
> default without repeating the first-key check in every step. Your
> comment rewrite explains the interaction much better than my original;
> agreed it was too thin.
>
> Happy with the adjustments -- thanks for picking this up.

OK thanks. I did a bit more work on the tests and pushed.

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2026-09-18 05:21:44 different result of regexp_instr than on Oracle
Previous Message Hayato Kuroda (Fujitsu) 2026-09-18 05:17:11 RE: Allow pg_read_all_stats to read replication origin status