File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 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
1010Jeffrey F. Naughton, Avi Pfeffer:
1111
1212 http://www.sai.msu.su/~megera/postgres/gist/papers/gist.ps
13+ https://dsf.berkeley.edu/papers/sigmod97-gist.pdf
1314
1415and implemented by J. Hellerstein and P. Aoki in an early version of
1516PostgreSQL (more details are available from The GiST Indexing Project
Original file line number Diff line number Diff line change 5151#define F_HAS_GARBAGE (1 << 4) /* some tuples on the page are dead,
5252 * but not deleted yet */
5353
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+ */
5562typedef XLogRecPtr GistNSN ;
5663
5764/*
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 .
6168 */
6269#define GistBuildLSN ((XLogRecPtr) 1)
6370
You can’t perform that action at this time.
0 commit comments