Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Remove redundant incomplete split assertion.
authorPeter Geoghegan <pg@bowt.ie>
Mon, 6 Jan 2020 01:42:13 +0000 (17:42 -0800)
committerPeter Geoghegan <pg@bowt.ie>
Mon, 6 Jan 2020 01:42:13 +0000 (17:42 -0800)
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

index 144d339e8d4953649ffbfde78bce69237759aafb..7ddba3ff9ff2a17dcc41e766d6da6ed012c80a6a 100644 (file)
@@ -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