Skip to content

Commit 102ac3e

Browse files
committed
fix 2 for spgist ptrack with xlog
1 parent f2db765 commit 102ac3e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/backend/access/spgist/spgdoinsert.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,12 +1114,14 @@ doPickSplit(Relation index, SpGistState *state,
11141114
leafdata = leafptr = (char *) palloc(totalLeafSizes);
11151115

11161116
/* Here we begin making the changes to the target pages */
1117+
if (current->buffer != InvalidBuffer)
1118+
ptrack_add_block(index, current->blkno);
1119+
if (parent->buffer != InvalidBuffer)
1120+
ptrack_add_block(index, parent->blkno);
1121+
if (newInnerBuffer != InvalidBuffer)
1122+
ptrack_add_block(index, BufferGetBlockNumber(newInnerBuffer));
11171123
if (newLeafBuffer != InvalidBuffer)
11181124
ptrack_add_block(index, BufferGetBlockNumber(newLeafBuffer));
1119-
if (BufferIsValid(saveCurrent.buffer))
1120-
ptrack_add_block(index, BufferGetBlockNumber(saveCurrent.buffer));
1121-
if (parent->buffer != InvalidBuffer)
1122-
ptrack_add_block(index, BufferGetBlockNumber(parent->buffer));
11231125
START_CRIT_SECTION();
11241126

11251127
/*

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