Commit 1961b1c1 authored by Heikki Linnakangas's avatar Heikki Linnakangas

Fix generation of SP-GiST vacuum WAL records.

I broke these in 8776faa8. Backpatch to
9.4, where that was done.
parent 2effb72e
...@@ -452,7 +452,7 @@ vacuumLeafRoot(spgBulkDeleteState *bds, Relation index, Buffer buffer) ...@@ -452,7 +452,7 @@ vacuumLeafRoot(spgBulkDeleteState *bds, Relation index, Buffer buffer)
xlrec.node = index->rd_node; xlrec.node = index->rd_node;
STORE_STATE(&bds->spgstate, xlrec.stateSrc); STORE_STATE(&bds->spgstate, xlrec.stateSrc);
ACCEPT_RDATA_DATA(&xlrec, sizeof(xlrec), 0); ACCEPT_RDATA_DATA(&xlrec, SizeOfSpgxlogVacuumRoot, 0);
/* sizeof(xlrec) should be a multiple of sizeof(OffsetNumber) */ /* sizeof(xlrec) should be a multiple of sizeof(OffsetNumber) */
ACCEPT_RDATA_DATA(toDelete, sizeof(OffsetNumber) * xlrec.nDelete, 1); ACCEPT_RDATA_DATA(toDelete, sizeof(OffsetNumber) * xlrec.nDelete, 1);
ACCEPT_RDATA_BUFFER(buffer, 2); ACCEPT_RDATA_BUFFER(buffer, 2);
...@@ -585,7 +585,7 @@ vacuumRedirectAndPlaceholder(Relation index, Buffer buffer) ...@@ -585,7 +585,7 @@ vacuumRedirectAndPlaceholder(Relation index, Buffer buffer)
{ {
XLogRecPtr recptr; XLogRecPtr recptr;
ACCEPT_RDATA_DATA(&xlrec, sizeof(xlrec), 0); ACCEPT_RDATA_DATA(&xlrec, SizeOfSpgxlogVacuumRedirect, 0);
ACCEPT_RDATA_DATA(itemToPlaceholder, sizeof(OffsetNumber) * xlrec.nToPlaceholder, 1); ACCEPT_RDATA_DATA(itemToPlaceholder, sizeof(OffsetNumber) * xlrec.nToPlaceholder, 1);
ACCEPT_RDATA_BUFFER(buffer, 2); ACCEPT_RDATA_BUFFER(buffer, 2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment