Repair problems with VACUUM destroying t_ctid chains too soon, and with
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 20 Aug 2005 00:40:32 +0000 (00:40 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 20 Aug 2005 00:40:32 +0000 (00:40 +0000)
commitf57e3f4cf36f3fdd89cae8d566479ad747809b2f
tree6cb7a1b32271692929ecef6be67a823c9d29cf3f
parent97bb6e89beed326aae1990d798107b4af9a9af02
Repair problems with VACUUM destroying t_ctid chains too soon, and with
insufficient paranoia in code that follows t_ctid links.  (We must do both
because even with VACUUM doing it properly, the intermediate state with
a dangling t_ctid link is visible concurrently during lazy VACUUM, and
could be seen afterwards if either type of VACUUM crashes partway through.)
Also try to improve documentation about what's going on.  Patch is a bit
bulky because passing the XMAX information around required changing the
APIs of some low-level heapam.c routines, but it's not conceptually very
complicated.  Per trouble report from Teodor and subsequent analysis.
This needs to be back-patched, but I'll do that after 8.1 beta is out.
src/backend/access/heap/heapam.c
src/backend/commands/async.c
src/backend/commands/trigger.c
src/backend/commands/vacuum.c
src/backend/executor/execMain.c
src/backend/utils/time/tqual.c
src/include/access/heapam.h
src/include/access/htup.h
src/include/executor/executor.h
src/include/utils/tqual.h