mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Support INCLUDE'd columns in SP-GiST.
Not much to say here: does what it says on the tin. We steal a previously-always-zero bit from the nextOffset field of leaf index tuples in order to track whether there is a nulls bitmap. Otherwise it works about like included columns in other index types. Pavel Borisov, reviewed by Andrey Borodin and Anastasia Lubennikova, and rather heavily editorialized on by me Discussion: https://postgr.es/m/CALT9ZEFi-vMp4faht9f9Junb1nO3NOSjhpxTmbm1UGLMsLqiEQ@mail.gmail.com
This commit is contained in:
@@ -122,8 +122,8 @@ spgRedoAddLeaf(XLogReaderState *record)
|
||||
|
||||
head = (SpGistLeafTuple) PageGetItem(page,
|
||||
PageGetItemId(page, xldata->offnumHeadLeaf));
|
||||
Assert(head->nextOffset == leafTupleHdr.nextOffset);
|
||||
head->nextOffset = xldata->offnumLeaf;
|
||||
Assert(SGLT_GET_NEXTOFFSET(head) == SGLT_GET_NEXTOFFSET(&leafTupleHdr));
|
||||
SGLT_SET_NEXTOFFSET(head, xldata->offnumLeaf);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -822,7 +822,7 @@ spgRedoVacuumLeaf(XLogReaderState *record)
|
||||
lt = (SpGistLeafTuple) PageGetItem(page,
|
||||
PageGetItemId(page, chainSrc[i]));
|
||||
Assert(lt->tupstate == SPGIST_LIVE);
|
||||
lt->nextOffset = chainDest[i];
|
||||
SGLT_SET_NEXTOFFSET(lt, chainDest[i]);
|
||||
}
|
||||
|
||||
PageSetLSN(page, lsn);
|
||||
|
||||
Reference in New Issue
Block a user