forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4b25f5d
committed
Revise BTP_HAS_GARBAGE nbtree VACUUM comments.
_bt_delitems_vacuum() comments claimed that it isn't worth another scanof the page to avoid falsely unsetting the BTP_HAS_GARBAGE page flaghint (this happens to be the same wording that was removed from_bt_delitems_delete() by my recent commitfe97c61). The comments madelittle sense, though. The issue can't have much to do with performing asecond scan of the target leaf page, since an LP_DEAD test could easilybe performed in the first scan of the page anyway (the scan that takesplace in btvacuumpage() caller).Revise the explanation. It makes much more sense to frame this as anissue about recovery conflicts. _bt_delitems_vacuum() cannot easilygenerate an XID cutoff in the same way that _bt_delitems_delete() isdesigned to.Falsely unsetting the page flag is not ideal, and is likely to happenmore often than was supposed by the original comments. Explain why itusually isn't a problem in practice. There may be an argument for_bt_delitems_vacuum() not clearing the BTP_HAS_GARBAGE bit, removing thequestion of it being falsely unset by VACUUM (there may even be anargument for not using a page level hint at all). This can be revisitedlater.1 parent823e739 commit4b25f5d
1 file changed
+10
-3
lines changedLines changed: 10 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1001 | 1001 |
| |
1002 | 1002 |
| |
1003 | 1003 |
| |
1004 |
| - | |
1005 |
| - | |
1006 |
| - | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
1007 | 1014 |
| |
1008 | 1015 |
| |
1009 | 1016 |
| |
|
0 commit comments
Comments
(0)