tableam: Avoid relying on relation size to determine validity of tids.
Andres Freund <andres@anarazel.de>
tableam: Avoid relying on relation size to determine validity of tids. Instead add a tableam callback to do so. To avoid adding per validation overhead, pass a scan to tuple_tid_valid. In heap's case we'd otherwise incurred a RelationGetNumberOfBlocks() call for each tid - which'd have added noticable overhead to nodeTidscan.c. Author: Andres Freund Reviewed-By: Ashwin Agrawal Discussion: https://postgr.es/m/20190515185447.gno2jtqxyktylyvs@alap3.anarazel.de
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/heap/heapam.c | modified | +9 −17 |
| src/backend/access/heap/heapam_handler.c | modified | +10 −0 |
| src/backend/access/table/tableam.c | modified | +27 −0 |
| src/backend/executor/nodeTidscan.c | modified | +48 −25 |
| src/backend/utils/adt/tid.c | modified | +8 −2 |
| src/include/access/heapam.h | modified | +1 −2 |
| src/include/access/tableam.h | modified | +26 −11 |
Discussion
- Pluggable Storage - Andres's take 179 messages · 2018-07-03 → 2019-08-17