aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/float.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2022-12-22 09:57:49 +1300
committerDavid Rowley <drowley@postgresql.org>2022-12-22 09:57:49 +1300
commiteb706fde8302c32267518663032905556db21f57 (patch)
tree4157410587d8e3e4255925c4e040a601c82beb09 /src/backend/utils/adt/float.c
parentf450695e8899fcaffd1da06b6ef1b7f39abcac89 (diff)
downloadpostgresql-eb706fde8302c32267518663032905556db21f57.tar.gz
postgresql-eb706fde8302c32267518663032905556db21f57.zip
Fix newly introduced bug in slab.c
d21ded75f changed the way slab.c works but introduced a bug that meant we could end up with the slab's curBlocklistIndex pointing to the wrong list. The condition which was checking for this was failing to account for two things: 1. The curBlocklistIndex could be 0 as we've currently got no non-full blocks to put chunks on. In this case, the dlist_is_empty() check cannot be performed as there can be any number of completely full blocks at that index. 2. The curBlocklistIndex may be greater than the index we just moved the block onto. Since we need to ensure we fill up fuller blocks first, we must reset curBlocklistIndex when changing any blocklist element that's less than the curBlocklistIndex too. Reported-by: Takamichi Osumi Discussion: https://postgr.es/m/TYCPR01MB8373329C6329768D7E093D68EDEB9@TYCPR01MB8373.jpnprd01.prod.outlook.com
Diffstat (limited to 'src/backend/utils/adt/float.c')
0 files changed, 0 insertions, 0 deletions