postgresql/src/include/storage
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
..
.gitignore When trace_lwlocks is used, identify individual lwlocks by name. 2015-09-11 14:01:39 -04:00
backendid.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
barrier.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
block.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
buf.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
buf_internals.h Fix inconsistencies and typos in the tree, take 11 2019-08-19 16:21:39 +09:00
buffile.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
bufmgr.h Speedup truncations of relation forks. 2019-09-24 17:31:26 +09:00
bufpage.h Fix inconsistencies and typos in the tree 2019-07-29 12:28:30 +09:00
checksum.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
checksum_impl.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
condition_variable.h Introduce timed waits for condition variables. 2019-07-13 13:51:05 +12:00
copydir.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
dsm.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
dsm_impl.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
fd.h Rearrange postmaster's startup sequence for better syslogger results. 2019-09-11 11:43:01 -04:00
freespace.h Speedup truncations of relation forks. 2019-09-24 17:31:26 +09:00
fsm_internals.h Fix inconsistencies and typos in the tree 2019-07-16 13:23:53 +09:00
indexfsm.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
ipc.h Use data directory inode number, not port, to select SysV resource keys. 2019-09-05 13:31:46 -04:00
item.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
itemid.h Standardize ItemIdData terminology. 2019-05-13 15:53:39 -07:00
itemptr.h Fix inconsistencies and typos in the tree, take 9 2019-08-05 12:14:58 +09:00
large_object.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
latch.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
lmgr.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
lock.h Fix inconsistencies and typos in the tree 2019-07-29 12:28:30 +09:00
lockdefs.h Fix inconsistencies and typos in the tree 2019-07-29 12:28:30 +09:00
lwlock.h Fix inconsistencies and typos in the tree 2019-07-29 12:28:30 +09:00
md.h Move some md.c-specific logic from smgr.c to md.c. 2019-07-17 15:00:22 +12:00
off.h Fix inconsistencies and typos in the tree, take 9 2019-08-05 12:14:58 +09:00
pg_sema.h Use data directory inode number, not port, to select SysV resource keys. 2019-09-05 13:31:46 -04:00
pg_shmem.h Use data directory inode number, not port, to select SysV resource keys. 2019-09-05 13:31:46 -04:00
pmsignal.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
predicate.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
predicate_internals.h Fix inconsistencies and typos in the tree 2019-07-16 13:23:53 +09:00
proc.h Fix inconsistencies and typos in the tree, take 9 2019-08-05 12:14:58 +09:00
procarray.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
proclist.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
proclist_types.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
procsignal.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
reinit.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
relfilenode.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
s_lock.h Fix spinlock assembly code for MIPS so it works on MIPS r6. 2019-06-22 20:31:50 -04:00
sharedfileset.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
shm_mq.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
shm_toc.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
shmem.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
sinval.h Remove superfluous newlines in function prototypes. 2019-07-31 00:05:21 -07:00
sinvaladt.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
smgr.h Speedup truncations of relation forks. 2019-09-24 17:31:26 +09:00
spin.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
standby.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
standbydefs.h Fix inconsistencies and typos in the tree, take 10 2019-08-13 13:53:41 +09:00
sync.h Fix assorted inconsistencies. 2019-06-08 08:16:38 +05:30