- Notifications
You must be signed in to change notification settings - Fork5k
Commit4c8ad67
committed
nbtree: Use only one notnullkey ScanKeyData.
_bt_first need only store one ScanKeyData struct on the stack for thepurposes of building an IS NOT NULL key based on an implied NOT NULLconstraint. We don't need INDEX_MAX_KEYS-many ScanKeyData structs.This saves us a little over 2KB in stack space. It's possible that thishas some performance benefit. It also seems simpler and more direct.It isn't possible for more than a single index attribute to need its ownimplied IS NOT NULL key: the first such attribute/IS NOT NULL key alwaysmakes _bt_first stop adding additional boundary keys to startKeys[].Using INDEX_MAX_KEYS-many ScanKeyData entries was (at best) misleading.Author: Peter Geoghegan <pg@bowt.ie>Reviewed-By: Mircea Cadariu <cadariu.mircea@gmail.com>Discussion:https://postgr.es/m/CAH2-Wzm=1kJMSZhhTLoM5BPbwQNWxUj-ynOEh=89ptDZAVgauw@mail.gmail.com1 parent48c2c7b commit4c8ad67
1 file changed
+6
-8
lines changedLines changed: 6 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
892 | 892 |
| |
893 | 893 |
| |
894 | 894 |
| |
895 |
| - | |
| 895 | + | |
896 | 896 |
| |
897 |
| - | |
| 897 | + | |
898 | 898 |
| |
899 | 899 |
| |
900 | 900 |
| |
| |||
1034 | 1034 |
| |
1035 | 1035 |
| |
1036 | 1036 |
| |
1037 |
| - | |
1038 | 1037 |
| |
1039 | 1038 |
| |
1040 | 1039 |
| |
| |||
1122 | 1121 |
| |
1123 | 1122 |
| |
1124 | 1123 |
| |
1125 |
| - | |
1126 |
| - | |
| 1124 | + | |
| 1125 | + | |
1127 | 1126 |
| |
1128 | 1127 |
| |
1129 | 1128 |
| |
1130 | 1129 |
| |
1131 | 1130 |
| |
1132 |
| - | |
1133 |
| - | |
1134 |
| - | |
| 1131 | + | |
| 1132 | + | |
1135 | 1133 |
| |
1136 | 1134 |
| |
1137 | 1135 |
| |
|
0 commit comments
Comments
(0)