aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/funcs_new.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-11-20 01:08:02 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-11-20 01:08:02 +0000
commit504d87c7cd7cba2a8ecd9d49e933c62e9b04eafd (patch)
tree755ddbf92e8cd5402c49d0be7baed1789b58475c /src/tutorial/funcs_new.c
parentdfb25d2863388a65c909845b8aaa46b87c9ad4b3 (diff)
downloadpostgresql-504d87c7cd7cba2a8ecd9d49e933c62e9b04eafd.tar.gz
postgresql-504d87c7cd7cba2a8ecd9d49e933c62e9b04eafd.zip
When truncating a relation in-place (eg during VACUUM), do not try to unlink
any no-longer-needed segments; just truncate them to zero bytes and leave the files in place for possible future re-use. This avoids problems when the segments are re-used due to relation growth shortly after truncation. Before, the bgwriter, and possibly other backends, could still be holding open file references to the old segment files, and would write dirty blocks into those files where they'd disappear from the view of other processes. Back-patch as far as 8.0. I believe the 7.x branches are not vulnerable, because they had no bgwriter, and "blind" writes by other backends would always be done via freshly-opened file references.
Diffstat (limited to 'src/tutorial/funcs_new.c')
0 files changed, 0 insertions, 0 deletions