summaryrefslogtreecommitdiff
path: root/src/include/postgres.h
diff options
context:
space:
mode:
authorTom Lane2007-09-16 02:38:31 +0000
committerTom Lane2007-09-16 02:38:31 +0000
commit2f2baf929931b66cbb39ef93a3f764792cfe26b6 (patch)
tree809547eec196ca70964e0d66e5798389140e6297 /src/include/postgres.h
parenta93840e343018241d40560da6b0431c4a8d6571f (diff)
Fix aboriginal mistake in lazy VACUUM's code for truncating away
no-longer-needed pages at the end of a table. We thought we could throw away pages containing HEAPTUPLE_DEAD tuples; but this is not so, because such tuples very likely have index entries pointing at them, and we wouldn't have removed the index entries. The problem only emerges in a somewhat unlikely race condition: the dead tuples have to have been inserted by a transaction that later aborted, and this has to have happened between VACUUM's initial scan of the page and then rechecking it for empty in count_nondeletable_pages. But that timespan will include an index-cleaning pass, so it's not all that hard to hit. This seems to explain a couple of previously unsolved bug reports.
Diffstat (limited to 'src/include/postgres.h')
0 files changed, 0 insertions, 0 deletions