forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite48c817
committed
Recycle deleted nbtree pages more aggressively.
Commit61b313e made nbtree consistently pass down a heaprel to lowlevel routines like _bt_getbuf(). Although this was primarily intendedas preparation for logical decoding on standbys, it also made it easy tocorrect an old deficiency in how nbtree VACUUM determines whether or notit's now safe to recycle deleted pages.Pass the heaprel to GlobalVisTestFor() in nbtree routines that deal withrecycle safety. nbtree now makes less pessimistic assumptions aboutrecycle safety within non-catalog relations. This enhancementcomplements the recycling enhancement added by commit9dd963a.nbtree remains just as pessimistic as ever when it comes to recyclesafety within indexes on catalog relations. There is no fundamentalreason why we need to treat catalog relations differently, though. Thebehavioral inconsistency is a consequence of the way that nbtree usesnextXID values to implement what Lanin and Shasha call "the draintechnique". Note in particular that it has nothing to do with whetheror not index tuples might still be required for an older MVCC snapshot.Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>Discussion:https://postgr.es/m/CAH2-WzkaiDxCje0yPuH=3Uh2p1V_2pFGY==xfbZoZu7Ax_NB8g@mail.gmail.com1 parenta349b86 commite48c817
3 files changed
+8
-10
lines changedLines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
935 | 935 |
| |
936 | 936 |
| |
937 | 937 |
| |
938 |
| - | |
| 938 | + | |
939 | 939 |
| |
940 | 940 |
| |
941 | 941 |
| |
| |||
2963 | 2963 |
| |
2964 | 2964 |
| |
2965 | 2965 |
| |
| 2966 | + | |
2966 | 2967 |
| |
2967 | 2968 |
| |
2968 | 2969 |
| |
| |||
2995 | 2996 |
| |
2996 | 2997 |
| |
2997 | 2998 |
| |
2998 |
| - | |
| 2999 | + | |
2999 | 3000 |
| |
3000 | 3001 |
| |
3001 | 3002 |
| |
| |||
3010 | 3011 |
| |
3011 | 3012 |
| |
3012 | 3013 |
| |
3013 |
| - | |
| 3014 | + | |
3014 | 3015 |
| |
3015 | 3016 |
| |
3016 | 3017 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1039 | 1039 |
| |
1040 | 1040 |
| |
1041 | 1041 |
| |
| 1042 | + | |
1042 | 1043 |
| |
1043 | 1044 |
| |
1044 | 1045 |
| |
| |||
1124 | 1125 |
| |
1125 | 1126 |
| |
1126 | 1127 |
| |
1127 |
| - | |
| 1128 | + | |
1128 | 1129 |
| |
1129 | 1130 |
| |
1130 | 1131 |
| |
|
Lines changed: 2 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
288 | 288 |
| |
289 | 289 |
| |
290 | 290 |
| |
291 |
| - | |
| 291 | + | |
292 | 292 |
| |
293 | 293 |
| |
294 | 294 |
| |
| |||
307 | 307 |
| |
308 | 308 |
| |
309 | 309 |
| |
310 |
| - | |
311 |
| - | |
312 |
| - | |
313 |
| - | |
314 | 310 |
| |
315 |
| - | |
| 311 | + | |
316 | 312 |
| |
317 | 313 |
| |
318 | 314 |
| |
|
0 commit comments
Comments
(0)