postgresql/src/backend/access
Fujii Masao 6d05086c0a Speedup truncations of relation forks.
When a relation is truncated, shared_buffers needs to be scanned
so that any buffers for the relation forks are invalidated in it.
Previously, shared_buffers was scanned for each relation forks, i.e.,
MAIN, FSM and VM, when VACUUM truncated off any empty pages
at the end of relation or TRUNCATE truncated the relation in place.
Since shared_buffers needed to be scanned multiple times,
it could take a long time to finish those commands especially
when shared_buffers was large.

This commit changes the logic so that shared_buffers is scanned only
one time for those three relation forks.

Author: Kirk Jamison
Reviewed-by: Masahiko Sawada, Thomas Munro, Alvaro Herrera, Takayuki Tsunakawa and Fujii Masao
Discussion: https://postgr.es/m/D09B13F772D2274BB348A310EE3027C64E2067@g01jpexmbkw24
2019-09-24 17:31:26 +09:00
..
brin Fix inconsistencies and typos in the tree, take 10 2019-08-13 13:53:41 +09:00
common Split tuptoaster.c into three separate files. 2019-09-05 13:15:10 -04:00
gin Fix overflow check and comment in GIN posting list encoding. 2019-08-28 12:55:33 +03:00
gist Improve handling of NULLs in KNN-GiST and KNN-SP-GiST 2019-09-19 21:48:39 +03:00
hash Fix inconsistencies and typos in the tree, take 10 2019-08-13 13:53:41 +09:00
heap Speedup truncations of relation forks. 2019-09-24 17:31:26 +09:00
index Fix freeing old values in index_store_float8_orderby_distances() 2019-09-20 01:19:08 +03:00
nbtree Remove redundant _bt_truncate() comment paragraph. 2019-09-12 09:51:27 -07:00
rmgrdesc Fix nbtree page split rmgr desc routine. 2019-09-12 15:45:08 -07:00
spgist Improve handling of NULLs in KNN-GiST and KNN-SP-GiST 2019-09-19 21:48:39 +03:00
table Create an API for inserting and deleting rows in TOAST tables. 2019-09-06 10:38:51 -04:00
tablesample Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
transam Message style fixes 2019-09-23 13:38:39 +02:00
Makefile Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00