From: Bruce Momjian Date: Mon, 9 Mar 2009 13:08:05 +0000 (+0000) Subject: Add summarization comment about visibility functions. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=6d54da500caaaaee949a5cfac392d295cfa7da7d;p=users%2Fsimon%2Fpostgres.git Add summarization comment about visibility functions. Add URL about the Halloween problem. --- diff --git a/src/backend/utils/time/tqual.c b/src/backend/utils/time/tqual.c index dbfbb023ae..3d04a927df 100644 --- a/src/backend/utils/time/tqual.c +++ b/src/backend/utils/time/tqual.c @@ -26,6 +26,25 @@ * subtransactions of our own main transaction and so there can't be any * race condition. * + * Summary of visibility functions: + * + * HeapTupleSatisfiesMVCC() + * visible to supplied snapshot, excludes current command + * HeapTupleSatisfiesNow() + * visible to instant snapshot, excludes current command + * HeapTupleSatisfiesUpdate() + * like HeapTupleSatisfiesNow(), but with user-supplied command + * counter and more complex result + * HeapTupleSatisfiesSelf() + * visible to instant snapshot and current command + * HeapTupleSatisfiesDirty() + * like HeapTupleSatisfiesSelf(), but includes open transactions + * HeapTupleSatisfiesVacuum() + * visible to any running transaction, used by VACUUM + * HeapTupleSatisfiesToast() + * visible unless part of interrupted vacuum, used for TOAST + * HeapTupleSatisfiesAny() + * all tuples are visible * * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California @@ -277,7 +296,7 @@ HeapTupleSatisfiesSelf(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer) * * Note we do _not_ include changes made by the current command. This * solves the "Halloween problem" wherein an UPDATE might try to re-update - * its own output tuples. + * its own output tuples, http://en.wikipedia.org/wiki/Halloween_Problem. * * Note: * Assumes heap tuple is valid.