summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2021-02-13 18:50:49 +0000
committerBruce Momjian2021-02-13 18:50:49 +0000
commit8facf1ea00b7a0c08c755a0392212b83e04ae28a (patch)
tree3d82a50d3b2146fc890f5c83b21d76f0106415b9
parent8063d0f6f56e53edd991f53aadc8cb7f8d3fdd8f (diff)
README/C-comment: document GiST's NSN value
-rw-r--r--src/backend/access/gist/README8
-rw-r--r--src/include/access/gist.h1
2 files changed, 5 insertions, 4 deletions
diff --git a/src/backend/access/gist/README b/src/backend/access/gist/README
index fffdfff6e17..8ca0cf78cc9 100644
--- a/src/backend/access/gist/README
+++ b/src/backend/access/gist/README
@@ -92,10 +92,10 @@ index child page to be split between the time we make a queue entry for it
(while visiting its parent page) and the time we actually reach and scan
the child page. To avoid missing the entries that were moved to the right
sibling, we detect whether a split has occurred by comparing the child
-page's NSN to the LSN that the parent had when visited. If it did, the
-sibling page is immediately added to the front of the queue, ensuring that
-its items will be scanned in the same order as if they were still on the
-original child page.
+page's NSN (node sequence number, a special-purpose LSN) to the LSN that
+the parent had when visited. If it did, the sibling page is immediately
+added to the front of the queue, ensuring that its items will be scanned
+in the same order as if they were still on the original child page.
As is usual in Postgres, the search algorithm only guarantees to find index
entries that existed before the scan started; index entries added during
diff --git a/src/include/access/gist.h b/src/include/access/gist.h
index 00c6b4f2bb9..aa5f1763dd0 100644
--- a/src/include/access/gist.h
+++ b/src/include/access/gist.h
@@ -51,6 +51,7 @@
#define F_HAS_GARBAGE (1 << 4) /* some tuples on the page are dead,
* but not deleted yet */
+/* NSN - node sequence number, a special-purpose LSN */
typedef XLogRecPtr GistNSN;
/*