Re: explain plans for foreign servers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: explain plans for foreign servers
Date
Msg-id 341357.1741201933@sss.pgh.pa.us
Whole thread Raw
In response to Re: explain plans for foreign servers  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: explain plans for foreign servers
Re: explain plans for foreign servers
List pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> Ideally, we'd have EXPLAIN ANALYZE return two result sets, kind of like
> how a query with a semicolon returns two result sets. That changes the
> expected message flow for EXPLAIN ANALYZE, though, so we'd need a new
> option so we are sure the client is expecting it (is this a sane
> idea?).

I'm afraid not.  That pretty fundamentally breaks the wire protocol,
I think.  Also (1) there could be more than two, no, if the query
touches more than one foreign table?  How would the client know
how many to expect?  (2) there would be no particularly compelling
ordering for the multiple resultsets.

> I wonder if Robert's extensible EXPLAIN work[1] could be useful
> here?

I'm wondering the same.  You could certainly imagine cramming
all of the foreign EXPLAIN output into some new field attached
to the ForeignScan node.  Readability and indentation would
require some thought, but the other approaches don't have any
mechanism for addressing that at all.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: explain plans for foreign servers
Next
From: Andres Freund
Date:
Subject: Re: Interrupts vs signals