diff options
author | Peter Geoghegan <pg@bowt.ie> | 2020-03-10 17:25:47 -0700 |
---|---|---|
committer | Peter Geoghegan <pg@bowt.ie> | 2020-03-10 17:25:47 -0700 |
commit | 39eabec90451d8badbba9b3e938d6d05432a0517 (patch) | |
tree | 520540390f6acdecdcc12c46ee04528e738303e9 /src/backend/tcop/postgres.c | |
parent | c8e8b2f9dfee21fa4ef1ec7da5c10e6ef706df36 (diff) | |
download | postgresql-39eabec90451d8badbba9b3e938d6d05432a0517.tar.gz postgresql-39eabec90451d8badbba9b3e938d6d05432a0517.zip |
nbtree: Move fastpath NULL descent stack assertion.
Commit 074251db added an assertion that verified the fastpath/rightmost
page insert optimization's assumption about free space: There should
always be enough free space on the page to insert the new item without
splitting the page. Otherwise, we end up using the "concurrent root
page split" phony/fake stack path in _bt_insert_parent(). This does not
lead to incorrect behavior, but it is likely to be far slower than
simply using the regular _bt_search() path. The assertion catches
serious performance bugs that would probably take a long time to detect
any other way.
It seems much more natural to make this assertion just before the point
that we generate a fake/phony descent stack. Move the assert there.
This also makes _bt_insertonpg() a bit more readable.
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions