From: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
To: Shigeru Hanada <shigeru.hanada@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [Review] inherit support for foreign tables
Date: Tue, 28 Jan 2014 22:01:14 +0900
Message-ID: <52E7AA1A.7000008@lab.ntt.co.jp> (raw)
In-Reply-To: <CAEZqfEfLkbOnitJyNHQoX7VHH7-9=5hHpVyNABfE_pQXa6q-YQ@mail.gmail.com>
References: <52E11225.2080907@lab.ntt.co.jp>
<CAEZqfEf_MO_pHJqMjr2i6Y7OVUrbJJB3cWHm=4qmef8mFK+V=Q@mail.gmail.com>
<52E5D9AD.4000202@lab.ntt.co.jp>
<CAEZqfEfLkbOnitJyNHQoX7VHH7-9=5hHpVyNABfE_pQXa6q-YQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
(2014/01/27 21:49), Shigeru Hanada wrote:
> 2014-01-27 Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>:
>> (2014/01/25 11:27), Shigeru Hanada wrote:
>> Yeah, the consistency is essential for its ease of use. But I'm not sure
>> that inherited stats ignoring foreign tables is actually useful for query
>> optimization. What I think about the consistency is a) the ANALYZE command
>> with no table names skips ANALYZEing inheritance trees that include at least
>> one foreign table as a child, but b) the ANALYZE command with a table name
>> indicating an inheritance tree that includes any foreign tables does compute
>> the inherited stats in the same way as an inheritance tree consiting of only
>> ordinary tables by acquiring the sample rows from each foreign table on the
>> far side.
>
> b) sounds little complex to understand or explain.
>
> Is it too big change that making ANALYZE command to handle foreign
> tables too even if no table name was specified? IIRC, performance
> issue was the reason to exclude foreign tables from auto-analyze
> processing. ANALYZEing large database contains local huge data also
> takes long time. One idea to avoid unexpected long processing is to
> add option to foreign tables to mark it as "not-auto-analyzable".
Maybe I didn't express my idea clearly. Sorry for that.
I don't think that we now allow the ANALYZE command to handle foreign
tables when no table name is specified with the command. I think that
we allow the ANALYZE command to handle an inheritance tree that includes
foreign tables when the name of the parent table is specified, without
ignoring such foreign tables in the caluculation. ISTM it would be
possible to do so if we introduce a new parameter, say, vac_mode, which
indicates wether vacuum() is called with a specific table or not.
I'll try to modify the ANALYZE command to do so on top of you patch.
Thanks,
Best regards,
Etsuro Fujita
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: fujita.etsuro@lab.ntt.co.jp, shigeru.hanada@gmail.com
Subject: Re: [Review] inherit support for foreign tables
In-Reply-To: <52E7AA1A.7000008@lab.ntt.co.jp>
* 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