]> granicus.if.org Git - postgresql/commit
tableam: Avoid relying on relation size to determine validity of tids.
authorAndres Freund <andres@anarazel.de>
Sat, 18 May 2019 01:52:01 +0000 (18:52 -0700)
committerAndres Freund <andres@anarazel.de>
Sat, 18 May 2019 01:56:55 +0000 (18:56 -0700)
commit147e3722f7e531f15ba389a4d518efe8cd0bd736
treee48a71b19f0e9412b93ef15b8e40edd65f7a5415
parent7f44ede5941499c4cee13b812dd93335f4005095
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
src/backend/access/heap/heapam.c
src/backend/access/heap/heapam_handler.c
src/backend/access/table/tableam.c
src/backend/executor/nodeTidscan.c
src/backend/utils/adt/tid.c
src/include/access/heapam.h
src/include/access/tableam.h