forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb897b3a
committed
nbtree: Remove useless local variables.
Copying block and offset numbers to local variables in _bt_insertonpg()made the code less readable. Remove the variables. There is alreadycode that conditionally calls BufferGetBlockNumber() in the same block,so consistently do it that way instead.Calling BufferGetBlockNumber() is very cheap, but we might as well avoidit when it isn't truly necessary. It isn't truly necessary for_bt_insertonpg() to call BufferGetBlockNumber() in almost all cases.Spotted while working on a patch that refactors the fastpath rightmostleaf page cache optimization, which was added by commit2b27273.1 parent9b8aa09 commitb897b3a
1 file changed
+3
-8
lines changedLines changed: 3 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1180 | 1180 |
| |
1181 | 1181 |
| |
1182 | 1182 |
| |
1183 |
| - | |
1184 |
| - | |
1185 | 1183 |
| |
1186 | 1184 |
| |
1187 |
| - | |
1188 |
| - | |
1189 |
| - | |
1190 | 1185 |
| |
1191 | 1186 |
| |
1192 | 1187 |
| |
| |||
1218 | 1213 |
| |
1219 | 1214 |
| |
1220 | 1215 |
| |
1221 |
| - | |
| 1216 | + | |
1222 | 1217 |
| |
1223 | 1218 |
| |
1224 | 1219 |
| |
| |||
1227 | 1222 |
| |
1228 | 1223 |
| |
1229 | 1224 |
| |
1230 |
| - | |
| 1225 | + | |
1231 | 1226 |
| |
1232 | 1227 |
| |
1233 | 1228 |
| |
| |||
1260 | 1255 |
| |
1261 | 1256 |
| |
1262 | 1257 |
| |
1263 |
| - | |
| 1258 | + | |
1264 | 1259 |
| |
1265 | 1260 |
| |
1266 | 1261 |
| |
|
0 commit comments
Comments
(0)