Re: Custom Scan APIs (Re: Custom Plan node)

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>, Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>, Jim Mlodgenski <jimmy76(at)gmail(dot)com>, PgHacker <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Custom Scan APIs (Re: Custom Plan node)
Date: 2014-03-04 15:52:47
Message-ID: 20140304155247.GF12995@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
> > * Ashutosh Bapat (ashutosh(dot)bapat(at)enterprisedb(dot)com) wrote:
> >> During EXPLAIN, ExecInitNode() is called. If ExecInitNode() fires queries
> >> to foreign servers, those would be fired while EXPLAINing a query as well.
> >> We want to avoid that. Instead, we can run EXPLAIN on that query at foreign
> >> server. But again, not all foreign servers would be able to EXPLAIN the
> >> query e.g. file_fdw. OR totally avoid firing query during ExecInitNode(),
> >> if it's for EXPLAIN (except for ANALYSE may be).
>
> > Agreed that we wouldn't want to actually run a query when it's just
> > being explain'd. If the FDW can't tell the difference then we'd need to
> > address that, of course.
>
> EXEC_FLAG_EXPLAIN_ONLY ...

Yeah, figured there should be a way. Still not sure that kicking the
query off from ExecInitNode() is a good idea though. Perhaps it could
be optional somehow. I really like the idea of being able to make
Append work in an async mode where it's pulling data from multiple
sources at the same time, but it's a fair bit of work.

Thanks,

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Raiskup 2014-03-04 15:52:56 pg_upgrade: allow multiple -o/-O options
Previous Message Atri Sharma 2014-03-04 15:49:46 Re: ALTER TABLE lock strength reduction patch is unsafe