diff options
author | Jeff Davis <jdavis@postgresql.org> | 2023-11-17 13:58:16 -0800 |
---|---|---|
committer | Jeff Davis <jdavis@postgresql.org> | 2023-11-17 13:58:16 -0800 |
commit | b282fa88df78a05643d2df84a2b8e81cd9c1705d (patch) | |
tree | 591cff5d4694305f6188d3477b40e52c4b54b45f /src/backend/access/gist/gistproc.c | |
parent | a268a51de692c462e641a58ac842bbb0ac1e43ea (diff) | |
download | postgresql-b282fa88df78a05643d2df84a2b8e81cd9c1705d.tar.gz postgresql-b282fa88df78a05643d2df84a2b8e81cd9c1705d.zip |
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
Diffstat (limited to 'src/backend/access/gist/gistproc.c')
0 files changed, 0 insertions, 0 deletions