pgsql: Remove unused field from PartitionDescData struct

From: David Rowley <drowley(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove unused field from PartitionDescData struct
Date: 2026-08-04 01:30:10
Message-ID: E1wr3ys-000000005YY-17en@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove unused field from PartitionDescData struct

3592e0ff9 added caching logic to ExecFindPartition() to allow faster
partition lookups for LIST and RANGE partitions when we hit the same
partition multiple times in a row. The last_found_part_index field was
added, but it was never used, so remove it. Caching works by caching the
last matching index into the PartitionBoundInfo.datums, not by caching the
last found partition index.

Update comments to reflect this, and perform other general improvements to
the comments in this area.

Author: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>
Author: David Rowley <dgrowleyml(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAJ7c6TMRxO6vo1tNgLZs4nTNizpjCSWdUviB8Mf3nkYiNHNhzg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5ea1022e4a987b6cffe4ca6014fd1389b3311f88

Modified Files
--------------
src/backend/executor/execPartition.c | 67 +++++++++++++++++++-----------------
src/backend/partitioning/partdesc.c | 1 -
src/include/partitioning/partdesc.h | 8 +----
3 files changed, 36 insertions(+), 40 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2026-08-04 03:35:16 pgsql: Validate publisher for retain_dead_tuples in the apply worker.
Previous Message Nathan Bossart 2026-08-03 21:03:07 pgsql: Handle concurrently-dropped relations in database-wide VACUUM.