Make parallel nbtree index scans use an LWLock.
Peter Geoghegan <pg@bowt.ie>
Make parallel nbtree index scans use an LWLock. Teach parallel nbtree index scans to use an LWLock (not a spinlock) to protect the scan's shared descriptor state. Preparation for an upcoming patch that will add skip scan optimizations to nbtree. That patch will create the need to occasionally allocate memory while the scan descriptor is locked, while copying datums that were serialized by another backend. Author: Peter Geoghegan <pg@bowt.ie> Reviewed-By: Matthias van de Meent <boekewurm+postgres@gmail.com> Discussion: https://postgr.es/m/CAH2-Wz=PKR6rB7qbx+Vnd7eqeB5VTcrW=iJvAsTsKbdG+kW_UA@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/nbtree/nbtpreprocesskeys.c | modified | +1 −1 |
| src/backend/access/nbtree/nbtree.c | modified | +14 −13 |
| src/backend/storage/lmgr/lwlock.c | modified | +1 −0 |
| src/backend/utils/activity/wait_event_names.txt | modified | +1 −0 |
| src/include/storage/lwlock.h | modified | +1 −0 |
Discussion
- Adding skip scan (including MDAM style range skip scan) to nbtree 152 messages · 2024-06-26 → 2025-09-15