Re: use_remote_explain missing in docs of postgres_fdw

Lists: pgsql-hackers
From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: use_remote_explain missing in docs of postgres_fdw
Date: 2013-02-22 02:11:18
Message-ID: CAB7nPqTv-H0agqBaon=tFGWDS9m3TtS465c_aif711hMuFWsqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi all,

While testing a bit this feature, I noticed that use_remote_explain is
available in the list of options for FOREIGN TABLE and SERVER but this is
not specified in the docs:
http://www.postgresql.org/docs/devel/static/postgres-fdw.html

postgres=# CREATE FOREIGN TABLE foo (a int, b int) server postgres_server
options (table_name 'aa', foo 'true');
ERROR: invalid option "foo"
HINT: Valid options in this context are: schema_name, table_name,
use_remote_explain

Regards,
--
Michael


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: use_remote_explain missing in docs of postgres_fdw
Date: 2013-02-22 08:13:09
Message-ID: 18618.1361520789@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
> While testing a bit this feature, I noticed that use_remote_explain is
> available in the list of options for FOREIGN TABLE and SERVER but this is
> not specified in the docs:
> http://www.postgresql.org/docs/devel/static/postgres-fdw.html

Wups ... for some reason it's "use_remote_estimate" in the docs. Thinko
on my part probably --- although on reflection, maybe that's a better
name anyway?

regards, tom lane


From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: use_remote_explain missing in docs of postgres_fdw
Date: 2013-02-22 11:41:22
Message-ID: CAB7nPqS=NKszvoKBCq_bHPpfv152nKQ7nf8Qw9nc2uiP513pSg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Feb 22, 2013 at 5:13 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
> > While testing a bit this feature, I noticed that use_remote_explain is
> > available in the list of options for FOREIGN TABLE and SERVER but this is
> > not specified in the docs:
> > http://www.postgresql.org/docs/devel/static/postgres-fdw.html
>
> Wups ... for some reason it's "use_remote_estimate" in the docs. Thinko
> on my part probably --- although on reflection, maybe that's a better
> name anyway?
>
Indeed, use_remote_estimate is better. use_remote_explain makes it sound
like an EXPLAIN query would be sent to remote server. That is at least the
first impression I had when testing the feature without reading the docs.
--
Michael


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: use_remote_explain missing in docs of postgres_fdw
Date: 2013-02-22 14:01:17
Message-ID: 27770.1361541677@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
> On Fri, Feb 22, 2013 at 5:13 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Wups ... for some reason it's "use_remote_estimate" in the docs. Thinko
>> on my part probably --- although on reflection, maybe that's a better
>> name anyway?

> Indeed, use_remote_estimate is better. use_remote_explain makes it sound
> like an EXPLAIN query would be sent to remote server. That is at least the
> first impression I had when testing the feature without reading the docs.

Well, it does do that, at least for the part of the query that will be
executed on the remote server. But if you read it to mean the whole
query would be EXPLAINed on the remote server, that's wrong.

The objection I have to "use_remote_explain" is that it's focusing too
much on the mechanism (ie, send an EXPLAIN command for execution) rather
than the result (ie, get a cost estimate from the remote server).
So I'm inclined to change the code to match the docs rather than vice
versa. Anyone have a contrary opinion?

regards, tom lane