Skip to content

Commit 69ddfa1

Browse files
committed
Fix error in cfs_alloc_page
1 parent 55eac74 commit 69ddfa1

File tree

1 file changed

+2
-0
lines changed
  • src/backend/storage/file

1 file changed

+2
-0
lines changed

src/backend/storage/file/cfs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,8 @@ uint32 cfs_alloc_page(FileMap* map, uint32 oldSize, uint32 newSize)
479479
elog(ERROR, "CFS: segment file exceed 4Gb limit");
480480
} while (!pg_atomic_compare_exchange_u32(&map->hdr.physSize, &oldPhysSize, newPhysSize));
481481

482+
pg_atomic_fetch_sub_u32(&map->hdr.usedSize, newSize - oldSize);
483+
482484
return oldPhysSize;
483485
}
484486

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy