From fc3100112395485f1c65848b273b3235de4aad07 Mon Sep 17 00:00:00 2001 From: Peter Geoghegan Date: Sun, 5 Jan 2020 17:42:13 -0800 Subject: [PATCH] Remove redundant incomplete split assertion. The fastpath insert optimization's incomplete split flag Assert() is redundant. We'll reach the more general Assert() within _bt_findinsertloc() in all cases. (Besides, Assert()'ing that the rightmost page doesn't have the flag set never made much sense.) --- src/backend/access/nbtree/nbtinsert.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c index 144d339e8d..7ddba3ff9f 100644 --- a/src/backend/access/nbtree/nbtinsert.c +++ b/src/backend/access/nbtree/nbtinsert.c @@ -179,11 +179,6 @@ top: PageGetMaxOffsetNumber(page) >= P_FIRSTDATAKEY(lpageop) && _bt_compare(rel, itup_key, page, P_FIRSTDATAKEY(lpageop)) > 0) { - /* - * The right-most block should never have an incomplete split. - * But be paranoid and check for it anyway. - */ - Assert(!P_INCOMPLETE_SPLIT(lpageop)); fastpath = true; } else