diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-25 22:07:21 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-25 22:07:21 +0000 |
commit | 2ba05400242c31604c14a1d0276abeabc7d7ed77 (patch) | |
tree | 05477f5f8d56e3f28da62e254349d486ab035dc3 /src/backend/utils | |
parent | c9e69d71bda9a4e1b41bd2c08a2a57b70b97b334 (diff) | |
download | postgresql-2ba05400242c31604c14a1d0276abeabc7d7ed77.tar.gz postgresql-2ba05400242c31604c14a1d0276abeabc7d7ed77.zip |
Back-patch fixes for problems with VACUUM destroying t_ctid chains too soon,
and with insufficient paranoia in code that follows t_ctid links.
This patch covers the 7.4 branch.
Diffstat (limited to 'src/backend/utils')
-rw-r--r-- | src/backend/utils/time/tqual.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/backend/utils/time/tqual.c b/src/backend/utils/time/tqual.c index 7e073610900..a6257ab3303 100644 --- a/src/backend/utils/time/tqual.c +++ b/src/backend/utils/time/tqual.c @@ -30,7 +30,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.70.2.1 2005/05/07 21:23:02 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.70.2.2 2005/08/25 22:07:19 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -972,10 +972,13 @@ HeapTupleSatisfiesVacuum(HeapTupleHeader tuple, TransactionId OldestXmin) HeapTupleHeaderGetXmax(tuple))) { /* - * inserter also deleted it, so it was never visible to anyone - * else + * Inserter also deleted it, so it was never visible to anyone + * else. However, we can only remove it early if it's not an + * updated tuple; else its parent tuple is linking to it via t_ctid, + * and this tuple mustn't go away before the parent does. */ - return HEAPTUPLE_DEAD; + if (!(tuple->t_infomask & HEAP_UPDATED)) + return HEAPTUPLE_DEAD; } if (!TransactionIdPrecedes(HeapTupleHeaderGetXmax(tuple), OldestXmin)) |