pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yilin Zhang <jiezhilove@126.com>
To: Dinesh Salve <cooltodinesh@gmail.com>
Cc: solai v <solai.cdac@gmail.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Sami Imseih <samimseih@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org, "Jeff Davis" <pgsql@j-davis.com>
Subject: Re: explain plans for foreign servers
Date: Fri, 7 Aug 2026 09:27:30 +0800 (CST)
Message-ID: <5b33d1f8.da9.19fd9d51dbc.Coremail.jiezhilove@126.com> (raw)
In-Reply-To: <CAP+B4TC_06iSx8cBTLP9KHaC2DHEfvx8A6n7T=ZYFHiyHWe-5Q@mail.gmail.com>
References: <CAP+B4TD=iy-C2EnsrJgjpwSc7_4pd3Xh-gFzA0bwsw3q8u860g@mail.gmail.com>
	<CAA5RZ0vXiOiodrNQ-Va4FCAkXMpGA=GZDeKjFBRgRvHGuW7s7Q@mail.gmail.com>
	<07147023882ac6c4424df946fd4b82b8e8c211a5.camel@j-davis.com>
	<341357.1741201933@sss.pgh.pa.us>
	<fc0cd0a77a2a5566f30a630580affb9fc3f43ce7.camel@j-davis.com>
	<CAP+B4TDxE3gbrixL9qR9F+CK_N_N0-HmXSL55QXVZNAorRHSHQ@mail.gmail.com>
	<CAA5RZ0skXF+d7SANSnMi3xMTs9zr6dZadyc5OEtPiMnw-rGizw@mail.gmail.com>
	<CAA5RZ0vFAhGgz-VwE0NwvesHNDN5PWAgWA1B=cECg0=5nt0kjQ@mail.gmail.com>
	<CAA5RZ0spw7Fmd5pGvFdTaG2GqkSm6HeXJABbBeqzUDkuN4uevQ@mail.gmail.com>
	<CAP+B4TDRPOth7EJcmFMNaA-XchbPpfZ1OPk+__0a1ZMhibJjrw@mail.gmail.com>
	<CAA5RZ0taqqxv8m8RuZJkFXQ_ZxtaQNcHnga47LW5dKYqZLt4Rg@mail.gmail.com>
	<CAP+B4TDngSD2SftX3-O_scuPPBcYQOUaRhraH-XhX4WQ1KeDsA@mail.gmail.com>
	<CAA5RZ0t_5rMsjFficztwJD7nuupbS4GDj0suKxfShdRXjm7c0A@mail.gmail.com>
	<CAP+B4TBATGojLy4ySehGRLWYHyt9WW-ggL+3T=GSn006kiuqqQ@mail.gmail.com>
	<CAP+B4TANKj+1h1iJc86vj2XFs075ghXNkjzruRAL6G1yZLX3GQ@mail.gmail.com>
	<259e89b5.2626.19f9215f7e2.Coremail.jiezhilove@126.com>
	<CAF0whuedJhPVgXsBf=0jHcHTU0FjvDP-wd04Fnuz3T7aL9Bq=Q@mail.gmail.com>
	<CAP+B4TC_06iSx8cBTLP9KHaC2DHEfvx8A6n7T=ZYFHiyHWe-5Q@mail.gmail.com>

At 2026-08-05 18:47:51, "Dinesh Salve" <cooltodinesh@gmail.com> wrote:
Thanks a lot Solai for testing the patch, appreciate it.


Hi Bharath,
Thanks for the inputs, attached v7 patch to make review easier.


> IMO, we don't need to print all the flavors of explain plans
I have removed formatting related tests from file postgres_fdw.sql and moved to a separate file remote_plans_formats.sql. 
We still need tests around formatting as my changes introduce some new elements.


> Another point, why are we not supporting explain analyze?
This will be part of follow-up work, I wanted agreement on the shape first from the community.
One design I considered is an auto_explain-style GUC asking the remote to emit the plan for the statement it is already
running, but we cannot assume an arbitrary foreign server has that, so it needs a fallback and more thought.


> 1/ Why not get the extension id at once in _PG_init
Fixed, also I moved all the EXPLAIN plumbing into postgres_fdw.c behind postgres_fdw_explain_init(), called from
_PG_init.  The extension id, the saved hook pointers and both hook functions are now static.


Addressed other comments regarding documentation around GENERIC_PLAN option and added error case handling non-existent remote table.


Hi,
Thanks for Dinesh's recent patch, LGTM.



Best regards,

--

Yilin Zhang



view thread (31+ messages)  latest in thread

Message-ID: <5b33d1f8.da9.19fd9d51dbc.Coremail.jiezhilove@126.com>
Permalink:  ../5b33d1f8.da9.19fd9d51dbc.Coremail.jiezhilove@126.com/
Also on:    postgresql.org/message-id/5b33d1f8.da9.19fd9d51dbc.Coremail.jiezhilove@126.com

 · 

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: jiezhilove@126.com, cooltodinesh@gmail.com, solai.cdac@gmail.com, bharath.rupireddyforpostgres@gmail.com, samimseih@gmail.com, tgl@sss.pgh.pa.us, pgsql@j-davis.com
  Subject: Re: explain plans for foreign servers
  In-Reply-To: <5b33d1f8.da9.19fd9d51dbc.Coremail.jiezhilove@126.com>
  References: <CAP+B4TD=iy-C2EnsrJgjpwSc7_4pd3Xh-gFzA0bwsw3q8u860g@mail.gmail.com> <CAA5RZ0skXF+d7SANSnMi3xMTs9zr6dZadyc5OEtPiMnw-rGizw@mail.gmail.com> <CAA5RZ0vFAhGgz-VwE0NwvesHNDN5PWAgWA1B=cECg0=5nt0kjQ@mail.gmail.com> <CAA5RZ0spw7Fmd5pGvFdTaG2GqkSm6HeXJABbBeqzUDkuN4uevQ@mail.gmail.com> <CAP+B4TDRPOth7EJcmFMNaA-XchbPpfZ1OPk+__0a1ZMhibJjrw@mail.gmail.com> <CAA5RZ0taqqxv8m8RuZJkFXQ_ZxtaQNcHnga47LW5dKYqZLt4Rg@mail.gmail.com> <CAP+B4TDngSD2SftX3-O_scuPPBcYQOUaRhraH-XhX4WQ1KeDsA@mail.gmail.com> <CAA5RZ0t_5rMsjFficztwJD7nuupbS4GDj0suKxfShdRXjm7c0A@mail.gmail.com> <CAP+B4TBATGojLy4ySehGRLWYHyt9WW-ggL+3T=GSn006kiuqqQ@mail.gmail.com> <CAP+B4TANKj+1h1iJc86vj2XFs075ghXNkjzruRAL6G1yZLX3GQ@mail.gmail.com> <259e89b5.2626.19f9215f7e2.Coremail.jiezhilove@126.com> <CAF0whuedJhPVgXsBf=0jHcHTU0FjvDP-wd04Fnuz3T7aL9Bq=Q@mail.gmail.com> <CAP+B4TC_06iSx8cBTLP9KHaC2DHEfvx8A6n7T=ZYFHiyHWe-5Q@mail.gmail.com> <5b33d1f8.da9.19fd9d51dbc.Coremail.jiezhilove@126.com>

* 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