]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Tighten up TS dictionary cache entry creation.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 2 Aug 2026 20:49:17 +0000 (16:49 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 2 Aug 2026 20:49:17 +0000 (16:49 -0400)
commit4e68b7e291d39bc778f867e08f2741e63417fc2e
tree535ec7282f5ec25432bd9a9d1e45e4536002d0f4
parent330a72052cd166894557eff8b4e30e96174b205f
Tighten up TS dictionary cache entry creation.

In the not-too-likely scenario where we successfully created a hash
table entry for a TS dictionary, but then failed to make a small
memory context for it, we left the hash entry in existence but with
a garbage value for dictCtx.  This confused the code the next time
through, leading to a crash.  Rearrange things so that we leave
the hash entry in a well-defined state with dictCtx == NULL, and
then the next try knows it still needs to make a memory context.

Reported-by: Alexander Lakhin <exclusion@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/0f3ddeb5-0dbd-479c-9d0e-ae254758e624@gmail.com
Backpatch-through: 14
src/backend/utils/cache/ts_cache.c