- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitb029395
committed
Refactor nbtree fastpath optimization.
Commit2b27273, which added the fastpath rightmost leaf page cacheinsert optimization, added code to _bt_doinsert() to handle using andinvalidating the backend local block cache. It doesn't seem like a goodplace to handle these low level details, though. _bt_doinsert() issupposed to be a high level function -- it is the main entry point tonbtinsert.c.Restructure the code by placing handling of the rightmost block cache atthe start of a new _bt_search() shim function, _bt_search_insert(). Thenew function is called from _bt_doinsert(), which uses it as a_bt_search() variant that conveniently accepts its BTInsertState stateas an argument. _bt_doinsert() no longer needs to directly consider thefastpath optimization.Discussion:https://postgr.es/m/CAH2-Wzk59cxKJRd=rfbyub6-V4yWRjsOYRkUNHBLT1P1GdtCQQ@mail.gmail.com1 parenta2b1faa commitb029395
1 file changed
+160
-125
lines changed0 commit comments
Comments
(0)