Re: Hooking into ExplainOneQuery() complicated by missing standard_ExplainOneQuery

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Jelte Fennema-Nio <postgres@jeltef.nl>
Cc: Mats Kindahl <mats@timescale.com>, Andrei Lepikhov <a.lepikhov@postgrespro.ru>, Aleksander Alekseev <aleksander@timescale.com>, pgsql-hackers@lists.postgresql.org
Date: 2024-03-06T22:45:01Z
Lists: pgsql-hackers
On Wed, Mar 06, 2024 at 10:32:01AM +0100, Jelte Fennema-Nio wrote:
> This patch would definitely be useful for Citus. We indeed currently
> copy all of that code into our own explain hook. And it seems we
> actually have some bug. Because the es->memory branches were not
> copied (probably because this code didn't exist when we copied it).
> 
> https://github.com/citusdata/citus/blob/d59c93bc504ad32621d66583de6b65f936b0ed13/src/backend/distributed/planner/multi_explain.c#L1248-L1289

That's nice.  You would be able to shave quite a bit of code.  If
there are no objections, I propose to apply the change of this thread
to have this standard explain wrapper at the beginning of next week.
If others have any comments, feel free.
--
Michael

Commits

  1. Improve support for ExplainOneQuery() hook