forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commiteb706fd
committed
Fix newly introduced bug in slab.c
d21ded7 changed the way slab.c works but introduced a bug that meant wecould end up with the slab's curBlocklistIndex pointing to the wrong list.The condition which was checking for this was failing to account for twothings:1. The curBlocklistIndex could be 0 as we've currently got no non-fullblocks to put chunks on. In this case, the dlist_is_empty() check cannotbe performed as there can be any number of completely full blocks at thatindex.2. The curBlocklistIndex may be greater than the index we just moved theblock onto. Since we need to ensure we fill up fuller blocks first, wemust reset curBlocklistIndex when changing any blocklist element that'sless than the curBlocklistIndex too.Reported-by: Takamichi OsumiDiscussion:https://postgr.es/m/TYCPR01MB8373329C6329768D7E093D68EDEB9@TYCPR01MB8373.jpnprd01.prod.outlook.com1 parentf450695 commiteb706fd
1 file changed
+11
-7
lines changedLines changed: 11 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
691 | 691 |
| |
692 | 692 |
| |
693 | 693 |
| |
694 |
| - | |
695 |
| - | |
696 |
| - | |
697 |
| - | |
698 |
| - | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
699 | 699 |
| |
700 |
| - | |
701 |
| - | |
| 700 | + | |
702 | 701 |
| |
703 | 702 |
| |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
704 | 708 |
| |
705 | 709 |
| |
706 | 710 |
| |
|
0 commit comments
Comments
(0)