pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix array allocation bugs in SetExplainExtensionState.
Date: Thu, 25 Sep 2025 15:58:27 +0000
Message-ID: <E1v1oMV-00028G-0N@gemulon.postgresql.org> (raw)

Fix array allocation bugs in SetExplainExtensionState.

If we already have an extension_state array but see a new extension_id
much larger than the highest the extension_id we've previously seen,
the old code might have failed to expand the array to a large enough
size, leading to disaster. Also, if we don't have an extension array
at all and need to create one, we should make sure that it's big enough
that we don't have to resize it instantly.

Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: http://postgr.es/m/2949591.1758570711@sss.pgh.pa.us
Backpatch-through: 18

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/694057d236b114f8c750b996b9ca5b8a07424650

Modified Files
--------------
src/backend/commands/explain_state.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1v1oMV-00028G-0N@gemulon.postgresql.org>
Permalink:  ../E1v1oMV-00028G-0N@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1v1oMV-00028G-0N@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: rhaas@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix array allocation bugs in SetExplainExtensionState.
  In-Reply-To: <E1v1oMV-00028G-0N@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox