Skip to content

Commit bf09437

Browse files
committed
Fix GiST README's explanation of the NSN cross-check.
The text got the condition backwards, it's "NSN > LSN", not "NSN < LSN". While we're at it, expand it a little for clarity. Reviewed-by: Daniel Gustafsson Discussion: https://www.postgresql.org/message-id/4cb46e18-e688-524a-0f73-b1f03ed5d6ee@iki.fi
1 parent 9847ca2 commit bf09437

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/access/gist/README

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,10 @@ should be visited too. When split inserts the downlink to the parent, it
271271
clears the F_FOLLOW_RIGHT flag in the child, and sets the NSN field in the
272272
child page header to match the LSN of the insertion on the parent. If the
273273
F_FOLLOW_RIGHT flag is not set, a scan compares the NSN on the child and the
274-
LSN it saw in the parent. If NSN < LSN, the scan looked at the parent page
275-
before the downlink was inserted, so it should follow the rightlink. Otherwise
276-
the scan saw the downlink in the parent page, and will/did follow that as
277-
usual.
274+
LSN it saw in the parent. If the child's NSN is greater than the LSN seen on
275+
the parent, the scan looked at the parent page before the downlink was
276+
inserted, so it should follow the rightlink. Otherwise the scan saw the
277+
downlink in the parent page, and will/did follow that as usual.
278278

279279
A scan can't normally see a page with the F_FOLLOW_RIGHT flag set, because
280280
a page split keeps the child pages locked until the downlink has been inserted

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy