agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Tighten up TS dictionary cache entry creation.
Date: Sun, 02 Aug 2026 20:49:34 +0000
Message-ID: <E1wqd7m-00000001OmH-0D9X@gemulon.postgresql.org> (raw)

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

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/81b1e79166a524b95628f8d459571f1b029fe19e

Modified Files
--------------
src/backend/utils/cache/ts_cache.c | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1wqd7m-00000001OmH-0D9X@gemulon.postgresql.org>
Permalink:  ../E1wqd7m-00000001OmH-0D9X@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wqd7m-00000001OmH-0D9X@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Tighten up TS dictionary cache entry creation.
  In-Reply-To: <E1wqd7m-00000001OmH-0D9X@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox