simplehash: preserve consistency in case of OOM.
Jeff Davis <jdavis@postgresql.org>
simplehash: preserve consistency in case of OOM. Compute size first, then allocate, then update the structure. Previously, an out-of-memory when growing could leave the hashtable in an inconsistent state. Discussion: https://postgr.es/m/20231117201334.eyb542qr5yk4gilq@awork3.anarazel.de Reviewed-by: Andres Freund Reviewed-by: Gurjeet Singh
Files
| Path | Change | +/− |
|---|---|---|
| src/include/lib/simplehash.h | modified | +31 −11 |
Discussion
- simplehash: preserve consistency in case of OOM 5 messages · 2023-11-17