pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sami Imseih <samimseih@gmail.com>
Cc: Andrei Lepikhov <lepihov@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Jeff Davis <pgsql@j-davis.com>
Cc: Thom Brown <thom@linux.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: making EXPLAIN extensible
Date: Wed, 19 Mar 2025 17:10:32 -0400
Message-ID: <815319.1742418632@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA5RZ0vFHyK=39fOobQDZVPTfcJEAGx=cyu6vmAy6J4JZ7+SKg@mail.gmail.com>
References: <CA+TgmoYSzg58hPuBmei46o8D3SKX+SZoO4K_aGQGwiRzvRApLg@mail.gmail.com>
	<CAA5RZ0uAPhbU9ZjG5JNDSfEE+2Kx+oAwGBdPLHhCU8H8kHG73A@mail.gmail.com>
	<2234935.1741809008@sss.pgh.pa.us>
	<CAA5RZ0vPvERsw1SJPohLm-sunLqndwEoP4VMD4NeZ1D0VVNB3w@mail.gmail.com>
	<CAA5RZ0uky7T78K4+-+3jMLrtfF2Oh7_Km6-XEoCc6E4M4Bpe6Q@mail.gmail.com>
	<CA+TgmoY06y2BqCYwfcn3=jXTRkio5CD+9fjbVbsJgUDN1PkRHA@mail.gmail.com>
	<CAA5RZ0tM8jEe_LSjjrTux9TbTpLex-PFQtSuVcfXCWT=N+thug@mail.gmail.com>
	<CA+Tgmoa+Yk8Pf80C1NgCu+ektyT=VZ_Wr+ZdZ0eTAC1RwKrp9w@mail.gmail.com>
	<CAA5RZ0v5pcWSxvuBrDfr2LeTw+0CkhoRc3SktPBHkEqh8Uhzcw@mail.gmail.com>
	<CAA5RZ0twuFUnP2U5w-XOtdqmWRi3VaB261x8jDxVs2YGaUUCUA@mail.gmail.com>
	<CA+TgmoZU1_arvV_gq1MfgQnW1LvK4m67Cp_O3jGMYM971gm45A@mail.gmail.com>
	<CAA5RZ0s=NYuB1SnuGmCbeC1=a0adQLmwSw3V-7E33u2R1=9JaA@mail.gmail.com>
	<CA+TgmoZt0-i=d07gHAVZ1Va_0eqCLSRTY+7KXzzWoXua9T1Kkw@mail.gmail.com>
	<CAA5RZ0vOcJF91O2e5AQN+V6guMNLMhJx83dxALf-iUZ-hLGO_Q@mail.gmail.com>
	<2c9376aa-9c66-4662-9803-3d9bc2afead1@gmail.c! om>
	<CAA5RZ0vFHyK=39fOobQDZVPTfcJEAGx=cyu6vmAy6J4JZ7+SKg@mail.gmail.com>

Sami Imseih <samimseih@gmail.com> writes:
>> It would be better to add the parameter "type: EXPLAIN_ONLY |
>> ANALYZE_ONLY | BOTH" to the RegisterExtensionExplainOption() routine.
>> This value will be saved inside the ExplainExtensionOption structure and
>> processed by the core inside the ParseExplainOptionList.

> hmm, IIUC, what you are describing is flag that will be limited to
> only check if an option can be used with EXPLAIN_ONLY, ANALYZE_ONLY
> or both. But what about if I have a case to check against between other
> extension options? let's say ExtensionAOptionA and ExtensionAoptionB.
> How would that work with the way you are suggesting?

More generally, I think that's quite a constricted view of what sorts
of checks an extension might need to make.  As an example, suppose
an extension's option conflicts with "GENERIC_PLAN on" for some reason
(perhaps it wants to modify the plan).

I think the current hook proposal is fine.  It leaves all the
validation work to be done by the extension(s), sure, but the amount
of code required to handle that one case is tiny, and the door is
left open to handle cases we didn't foresee.

			regards, tom lane





view thread (88+ messages)  latest in thread

Message-ID: <815319.1742418632@sss.pgh.pa.us>
Permalink:  ../815319.1742418632@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/815319.1742418632@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, samimseih@gmail.com, lepihov@gmail.com, robertmhaas@gmail.com, pgsql@j-davis.com, thom@linux.com
  Subject: Re: making EXPLAIN extensible
  In-Reply-To: <815319.1742418632@sss.pgh.pa.us>
  References: <CA+TgmoYSzg58hPuBmei46o8D3SKX+SZoO4K_aGQGwiRzvRApLg@mail.gmail.com> <2234935.1741809008@sss.pgh.pa.us> <CAA5RZ0vPvERsw1SJPohLm-sunLqndwEoP4VMD4NeZ1D0VVNB3w@mail.gmail.com> <CAA5RZ0uky7T78K4+-+3jMLrtfF2Oh7_Km6-XEoCc6E4M4Bpe6Q@mail.gmail.com> <CA+TgmoY06y2BqCYwfcn3=jXTRkio5CD+9fjbVbsJgUDN1PkRHA@mail.gmail.com> <CAA5RZ0tM8jEe_LSjjrTux9TbTpLex-PFQtSuVcfXCWT=N+thug@mail.gmail.com> <CA+Tgmoa+Yk8Pf80C1NgCu+ektyT=VZ_Wr+ZdZ0eTAC1RwKrp9w@mail.gmail.com> <CAA5RZ0v5pcWSxvuBrDfr2LeTw+0CkhoRc3SktPBHkEqh8Uhzcw@mail.gmail.com> <CAA5RZ0twuFUnP2U5w-XOtdqmWRi3VaB261x8jDxVs2YGaUUCUA@mail.gmail.com> <CA+TgmoZU1_arvV_gq1MfgQnW1LvK4m67Cp_O3jGMYM971gm45A@mail.gmail.com> <CAA5RZ0s=NYuB1SnuGmCbeC1=a0adQLmwSw3V-7E33u2R1=9JaA@mail.gmail.com> <CA+TgmoZt0-i=d07gHAVZ1Va_0eqCLSRTY+7KXzzWoXua9T1Kkw@mail.gmail.com> <CAA5RZ0vOcJF91O2e5AQN+V6guMNLMhJx83dxALf-iUZ-hLGO_Q@mail.gmail.com> <CAA5RZ0vFHyK=39fOobQDZVPTfcJEAGx=cyu6vmAy6J4JZ7+SKg@mail.gmail.com> <815319.1742418632@sss.pgh.pa.us>

* 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