git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e43fd89)
Add summarization comment about visibility functions.
Mon, 9 Mar 2009 13:08:05 +0000 (13:08 +0000)
Mon, 9 Mar 2009 13:08:05 +0000 (13:08 +0000)
Add URL about the Halloween problem.


diff --git a/src/backend/utils/time/tqual.c b/src/backend/utils/time/tqual.c
index 06720a2ea7cd36d8f45b99b08cbd759f2fe94e8b..3f5f7de1630b139d1f4429cc840767713d038fe4 100644 (file)
--- a/src/backend/utils/time/tqual.c
+++ b/src/backend/utils/time/tqual.c
@@ -26,12 +26,31 @@
* 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
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/time/tqual.c,v 1.111 2009年01月01日 17:23:53 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/time/tqual.c,v 1.112 2009年03月09日 13:08:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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.
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /