forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2c300c6
committed
Be smarter about age-counter overflow in formatting.c caches.
The previous code here simply threw away whatever it knew about cacheentry ages whenever a counter overflow occurred. Since the counteris int width and will be bumped once per format function execution,overflows are not really so rare as to not be worth thinking about.Instead, let's deal with the situation by halving all the age values,essentially rescaling the age metric. In that way, we retain apretty accurate (if not quite perfect) idea of which entries are oldest.1 parentf7a953c commit2c300c6
1 file changed
+38
-32
lines changedLines changed: 38 additions & 32 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3376 | 3376 |
| |
3377 | 3377 |
| |
3378 | 3378 |
| |
| 3379 | + | |
| 3380 | + | |
| 3381 | + | |
| 3382 | + | |
| 3383 | + | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
| 3388 | + | |
| 3389 | + | |
| 3390 | + | |
| 3391 | + | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
| 3396 | + | |
3379 | 3397 |
| |
3380 | 3398 |
| |
3381 | 3399 |
| |
3382 | 3400 |
| |
3383 | 3401 |
| |
3384 | 3402 |
| |
3385 |
| - | |
3386 |
| - | |
3387 |
| - | |
3388 |
| - | |
3389 |
| - | |
3390 |
| - | |
3391 |
| - | |
3392 |
| - | |
| 3403 | + | |
| 3404 | + | |
3393 | 3405 |
| |
3394 | 3406 |
| |
3395 | 3407 |
| |
| |||
3445 | 3457 |
| |
3446 | 3458 |
| |
3447 | 3459 |
| |
3448 |
| - | |
3449 |
| - | |
3450 |
| - | |
3451 |
| - | |
3452 |
| - | |
3453 |
| - | |
3454 |
| - | |
3455 |
| - | |
| 3460 | + | |
| 3461 | + | |
3456 | 3462 |
| |
3457 | 3463 |
| |
3458 | 3464 |
| |
| |||
4057 | 4063 |
| |
4058 | 4064 |
| |
4059 | 4065 |
| |
| 4066 | + | |
| 4067 | + | |
| 4068 | + | |
| 4069 | + | |
| 4070 | + | |
| 4071 | + | |
| 4072 | + | |
| 4073 | + | |
| 4074 | + | |
| 4075 | + | |
| 4076 | + | |
| 4077 | + | |
4060 | 4078 |
| |
4061 | 4079 |
| |
4062 | 4080 |
| |
4063 | 4081 |
| |
4064 | 4082 |
| |
4065 | 4083 |
| |
4066 |
| - | |
4067 |
| - | |
4068 |
| - | |
4069 |
| - | |
4070 |
| - | |
4071 |
| - | |
4072 |
| - | |
4073 |
| - | |
| 4084 | + | |
| 4085 | + | |
4074 | 4086 |
| |
4075 | 4087 |
| |
4076 | 4088 |
| |
| |||
4126 | 4138 |
| |
4127 | 4139 |
| |
4128 | 4140 |
| |
4129 |
| - | |
4130 |
| - | |
4131 |
| - | |
4132 |
| - | |
4133 |
| - | |
4134 |
| - | |
4135 |
| - | |
4136 |
| - | |
| 4141 | + | |
| 4142 | + | |
4137 | 4143 |
| |
4138 | 4144 |
| |
4139 | 4145 |
| |
|
0 commit comments
Comments
(0)