Commit 8facf1ea authored by Bruce Momjian's avatar Bruce Momjian

README/C-comment: document GiST's NSN value

parent 8063d0f6
...@@ -92,10 +92,10 @@ index child page to be split between the time we make a queue entry for it ...@@ -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 (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 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 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 page's NSN (node sequence number, a special-purpose LSN) to the LSN that
sibling page is immediately added to the front of the queue, ensuring that the parent had when visited. If it did, the sibling page is immediately
its items will be scanned in the same order as if they were still on the added to the front of the queue, ensuring that its items will be scanned
original child page. 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 As is usual in Postgres, the search algorithm only guarantees to find index
entries that existed before the scan started; index entries added during entries that existed before the scan started; index entries added during
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#define F_HAS_GARBAGE (1 << 4) /* some tuples on the page are dead, #define F_HAS_GARBAGE (1 << 4) /* some tuples on the page are dead,
* but not deleted yet */ * but not deleted yet */
/* NSN - node sequence number, a special-purpose LSN */
typedef XLogRecPtr GistNSN; typedef XLogRecPtr GistNSN;
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment