summaryrefslogtreecommitdiff
path: root/src/backend/access/gist
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/gist')
-rw-r--r--src/backend/access/gist/gist.c4
-rw-r--r--src/backend/access/gist/gistget.c4
-rw-r--r--src/backend/access/gist/gistutil.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index 5213cd71e97..3fb1a1285c5 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -682,7 +682,7 @@ gistdoinsert(Relation r, IndexTuple itup, Size freespace,
state.stack = stack = stack->parent;
}
- if (XLogRecPtrIsInvalid(stack->lsn))
+ if (!XLogRecPtrIsValid(stack->lsn))
stack->buffer = ReadBuffer(state.r, stack->blkno);
/*
@@ -698,7 +698,7 @@ gistdoinsert(Relation r, IndexTuple itup, Size freespace,
stack->page = BufferGetPage(stack->buffer);
stack->lsn = xlocked ?
PageGetLSN(stack->page) : BufferGetLSNAtomic(stack->buffer);
- Assert(!RelationNeedsWAL(state.r) || !XLogRecPtrIsInvalid(stack->lsn));
+ Assert(!RelationNeedsWAL(state.r) || XLogRecPtrIsValid(stack->lsn));
/*
* If this page was split but the downlink was never inserted to the
diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c
index 387d9972345..9ba45acfff3 100644
--- a/src/backend/access/gist/gistget.c
+++ b/src/backend/access/gist/gistget.c
@@ -46,7 +46,7 @@ gistkillitems(IndexScanDesc scan)
bool killedsomething = false;
Assert(so->curBlkno != InvalidBlockNumber);
- Assert(!XLogRecPtrIsInvalid(so->curPageLSN));
+ Assert(XLogRecPtrIsValid(so->curPageLSN));
Assert(so->killedItems != NULL);
buffer = ReadBuffer(scan->indexRelation, so->curBlkno);
@@ -353,7 +353,7 @@ gistScanPage(IndexScanDesc scan, GISTSearchItem *pageItem,
* parentlsn < nsn), or if the system crashed after a page split but
* before the downlink was inserted into the parent.
*/
- if (!XLogRecPtrIsInvalid(pageItem->data.parentlsn) &&
+ if (XLogRecPtrIsValid(pageItem->data.parentlsn) &&
(GistFollowRight(page) ||
pageItem->data.parentlsn < GistPageGetNSN(page)) &&
opaque->rightlink != InvalidBlockNumber /* sanity check */ )
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c
index 98b79608341..75272827837 100644
--- a/src/backend/access/gist/gistutil.c
+++ b/src/backend/access/gist/gistutil.c
@@ -1040,7 +1040,7 @@ gistGetFakeLSN(Relation rel)
Assert(!RelationNeedsWAL(rel));
/* No need for an actual record if we already have a distinct LSN */
- if (!XLogRecPtrIsInvalid(lastlsn) && lastlsn == currlsn)
+ if (XLogRecPtrIsValid(lastlsn) && lastlsn == currlsn)
currlsn = gistXLogAssignLSN();
lastlsn = currlsn;