aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistproc.c
diff options
context:
space:
mode:
authorJeff Davis <jdavis@postgresql.org>2023-11-17 13:58:16 -0800
committerJeff Davis <jdavis@postgresql.org>2023-11-17 13:58:16 -0800
commitb282fa88df78a05643d2df84a2b8e81cd9c1705d (patch)
tree591cff5d4694305f6188d3477b40e52c4b54b45f /src/backend/access/gist/gistproc.c
parenta268a51de692c462e641a58ac842bbb0ac1e43ea (diff)
downloadpostgresql-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