Hi, Turned out that there is an unused argument `isroot` in `btree_xlog_split` procedure. Suggested patch fixes it.
This issue was discovered by Anastasia Lubennikova, coding is done by me. -- Best regards, Aleksander Alekseev
diff --git a/src/backend/access/nbtree/nbtxlog.c b/src/backend/access/nbtree/nbtxlog.c index ac60db0d49..2db8f13cae 100644 --- a/src/backend/access/nbtree/nbtxlog.c +++ b/src/backend/access/nbtree/nbtxlog.c @@ -193,7 +193,7 @@ btree_xlog_insert(bool isleaf, bool ismeta, XLogReaderState *record) } static void -btree_xlog_split(bool onleft, bool isroot, XLogReaderState *record) +btree_xlog_split(bool onleft, XLogReaderState *record) { XLogRecPtr lsn = record->EndRecPtr; xl_btree_split *xlrec = (xl_btree_split *) XLogRecGetData(record); @@ -996,16 +996,12 @@ btree_redo(XLogReaderState *record) btree_xlog_insert(false, true, record); break; case XLOG_BTREE_SPLIT_L: - btree_xlog_split(true, false, record); - break; - case XLOG_BTREE_SPLIT_R: - btree_xlog_split(false, false, record); - break; case XLOG_BTREE_SPLIT_L_ROOT: - btree_xlog_split(true, true, record); + btree_xlog_split(true, record); break; + case XLOG_BTREE_SPLIT_R: case XLOG_BTREE_SPLIT_R_ROOT: - btree_xlog_split(false, true, record); + btree_xlog_split(false, record); break; case XLOG_BTREE_VACUUM: btree_xlog_vacuum(record);
signature.asc
Description: PGP signature