Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfd497ab

Browse files
committed
Add summarization comment about visibility functions.
Add URL about the Halloween problem.
1 parente43fd89 commitfd497ab

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

‎src/backend/utils/time/tqual.c

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,31 @@
2626
* subtransactions of our own main transaction and so there can't be any
2727
* race condition.
2828
*
29+
* Summary of visibility functions:
30+
*
31+
* HeapTupleSatisfiesMVCC()
32+
* visible to supplied snapshot, excludes current command
33+
* HeapTupleSatisfiesNow()
34+
* visible to instant snapshot, excludes current command
35+
* HeapTupleSatisfiesUpdate()
36+
* like HeapTupleSatisfiesNow(), but with user-supplied command
37+
* counter and more complex result
38+
* HeapTupleSatisfiesSelf()
39+
* visible to instant snapshot and current command
40+
* HeapTupleSatisfiesDirty()
41+
* like HeapTupleSatisfiesSelf(), but includes open transactions
42+
* HeapTupleSatisfiesVacuum()
43+
* visible to any running transaction, used by VACUUM
44+
* HeapTupleSatisfiesToast()
45+
* visible unless part of interrupted vacuum, used for TOAST
46+
* HeapTupleSatisfiesAny()
47+
* all tuples are visible
2948
*
3049
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
3150
* Portions Copyright (c) 1994, Regents of the University of California
3251
*
3352
* IDENTIFICATION
34-
* $PostgreSQL: pgsql/src/backend/utils/time/tqual.c,v 1.111 2009/01/01 17:23:53 momjian Exp $
53+
* $PostgreSQL: pgsql/src/backend/utils/time/tqual.c,v 1.112 2009/03/09 13:08:05 momjian Exp $
3554
*
3655
*-------------------------------------------------------------------------
3756
*/
@@ -277,7 +296,7 @@ HeapTupleSatisfiesSelf(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer)
277296
*
278297
* Note we do _not_ include changes made by the current command. This
279298
* solves the "Halloween problem" wherein an UPDATE might try to re-update
280-
* its own output tuples.
299+
* its own output tuples, http://en.wikipedia.org/wiki/Halloween_Problem.
281300
*
282301
* Note:
283302
*Assumes heap tuple is valid.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp