pgsql: Convert some ParallelBlockTableScanDescData fields to atomics.

From: Nathan Bossart <nathan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Convert some ParallelBlockTableScanDescData fields to atomics.
Date: 2026-09-04 15:56:43
Message-ID: E1x2WHS-00000003TGk-2cuV@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Convert some ParallelBlockTableScanDescData fields to atomics.

Currently, phs_startblock and phs_numblock are of type BlockNumber
and are protected by a spinlock. By converting them to atomic
variables, we can remove the spinlock and some retry code.

Reviewed-by: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Tested-by: solai v <solai(dot)cdac(at)gmail(dot)com>
Discussion: https://postgr.es/m/alAJeRRzehDjLaF1%40nathan

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7344937cbe640cd8c5304cefe7d6b726187ad4ab

Modified Files
--------------
src/backend/access/heap/heapam_handler.c | 2 +-
src/backend/access/table/tableam.c | 59 +++++++++++++++-----------------
src/include/access/relscan.h | 8 ++---
3 files changed, 31 insertions(+), 38 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2026-09-04 18:03:45 pgsql: Convert FastPathStrongRelationLocks to atomics.
Previous Message Daniel Gustafsson 2026-09-04 14:51:19 pgsql: doc: Pluralize MXID when referring to Multixact IDs