File tree 2 files changed +12
-4
lines changed
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ GiST stands for Generalized Search Tree. It was introduced in the seminal paper
10
10
Jeffrey F. Naughton, Avi Pfeffer:
11
11
12
12
http://www.sai.msu.su/~megera/postgres/gist/papers/gist.ps
13
+ https://dsf.berkeley.edu/papers/sigmod97-gist.pdf
13
14
14
15
and implemented by J. Hellerstein and P. Aoki in an early version of
15
16
PostgreSQL (more details are available from The GiST Indexing Project
Original file line number Diff line number Diff line change 51
51
#define F_HAS_GARBAGE (1 << 4) /* some tuples on the page are dead,
52
52
* but not deleted yet */
53
53
54
- /* NSN - node sequence number, a special-purpose LSN */
54
+ /*
55
+ * NSN (node sequence number) is a special-purpose LSN which is stored on each
56
+ * index page in GISTPageOpaqueData and updated only during page splits. By
57
+ * recording the parent's LSN in GISTSearchItem.parentlsn, it is possible to
58
+ * detect concurrent child page splits by checking if parentlsn < child's NSN,
59
+ * and handle them properly. The child page's LSN is insufficient for this
60
+ * purpose since it is updated for every page change.
61
+ */
55
62
typedef XLogRecPtr GistNSN ;
56
63
57
64
/*
58
- * A bogus LSN / NSN value used during index build . Must be smaller than any
59
- * real or fake unlogged LSN, so that after an index build finishes, all the
60
- * splits are considered completed .
65
+ * A fake LSN / NSN value used during index builds . Must be smaller than any
66
+ * real or fake ( unlogged) LSN generated after the index build completes so
67
+ * that all splits are considered complete .
61
68
*/
62
69
#define GistBuildLSN ((XLogRecPtr) 1)
63
70
You can’t perform that action at this time.
0 commit comments