diff options
Diffstat (limited to 'src/backend/access/gist')
-rw-r--r-- | src/backend/access/gist/gist.c | 4 | ||||
-rw-r--r-- | src/backend/access/gist/gistutil.c | 10 |
2 files changed, 4 insertions, 10 deletions
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index 783590ea55e..64ad2d749b0 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -197,7 +197,7 @@ gistplacetopage(Relation rel, Size freespace, GISTSTATE *giststate, SplitedPageLayout *dist = NULL, *ptr; BlockNumber oldrlink = InvalidBlockNumber; - GistNSN oldnsn = {0, 0}; + GistNSN oldnsn = 0; SplitedPageLayout rootpg; BlockNumber blkno = BufferGetBlockNumber(buffer); bool is_rootsplit; @@ -488,7 +488,7 @@ gistdoinsert(Relation r, IndexTuple itup, Size freespace, GISTSTATE *giststate) /* Start from the root */ firststack.blkno = GIST_ROOT_BLKNO; - firststack.lsn.xrecoff = 0; + firststack.lsn = 0; firststack.parent = NULL; firststack.downlinkoffnum = InvalidOffsetNumber; state.stack = stack = &firststack; diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c index 8039b5d569c..df1e2e396f2 100644 --- a/src/backend/access/gist/gistutil.c +++ b/src/backend/access/gist/gistutil.c @@ -706,13 +706,7 @@ gistoptions(PG_FUNCTION_ARGS) XLogRecPtr GetXLogRecPtrForTemp(void) { - static XLogRecPtr counter = {0, 1}; - - counter.xrecoff++; - if (counter.xrecoff == 0) - { - counter.xlogid++; - counter.xrecoff++; - } + static XLogRecPtr counter = 1; + counter++; return counter; } |