agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add a guc_check_handler to the EXPLAIN extension mechanism.
Date: Mon, 06 Apr 2026 16:46:22 +0000
Message-ID: <E1w9n5h-003GDi-0h@gemulon.postgresql.org> (raw)

Add a guc_check_handler to the EXPLAIN extension mechanism.

It would be useful to be able to tell auto_explain to set a custom
EXPLAIN option, but it would be bad if it tried to do so and the
option name or value wasn't valid, because then every query would fail
with a complaint about the EXPLAIN option. So add a guc_check_handler
that auto_explain will be able to use to only try to set option
name/value/type combinations that have been determined to be legal,
and to emit useful messages about ones that aren't.

Reviewed-by: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewed-by: Lukas Fittl <lukas@fittl.com>
Discussion: http://postgr.es/m/CA+Tgmob-0W8306mvrJX5Urtqt1AAasu8pi4yLrZ1XfwZU-Uj1w@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0442f1c9eff673849664d8ef71c202ad076e72e9

Modified Files
--------------
contrib/pg_overexplain/pg_overexplain.c |   6 +-
contrib/pg_plan_advice/pg_plan_advice.c |   3 +-
src/backend/commands/explain_state.c    | 121 ++++++++++++++++++++++++++++++--
src/include/commands/explain_state.h    |  13 +++-
4 files changed, 135 insertions(+), 8 deletions(-)



Message-ID: <E1w9n5h-003GDi-0h@gemulon.postgresql.org>
Permalink:  ../E1w9n5h-003GDi-0h@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w9n5h-003GDi-0h@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: Add a guc_check_handler to the EXPLAIN extension mechanism.
  In-Reply-To: <E1w9n5h-003GDi-0h@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