Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W88IT-0005Td-TR for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Jan 2014 13:01:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W88IT-0000cf-41 for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Jan 2014 13:01:45 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W88IR-0000cX-GF for pgsql-hackers@postgresql.org; Tue, 28 Jan 2014 13:01:43 +0000 Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W88IO-0003cr-Vm for pgsql-hackers@postgresql.org; Tue, 28 Jan 2014 13:01:42 +0000 Received: from mfs5.rdh.ecl.ntt.co.jp (mfs5.rdh.ecl.ntt.co.jp [129.60.39.144]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id s0SD1clQ006028; Tue, 28 Jan 2014 22:01:38 +0900 Received: from mfs5.rdh.ecl.ntt.co.jp (localhost.localdomain [127.0.0.1]) by mfs5.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 901E3E012B; Tue, 28 Jan 2014 22:01:38 +0900 (JST) Received: from imail3.m.ecl.ntt.co.jp (imail3.m.ecl.ntt.co.jp [129.60.5.248]) by mfs5.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 84288E0129; Tue, 28 Jan 2014 22:01:38 +0900 (JST) Received: from [129.60.241.236] ([129.60.241.236]) by imail3.m.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id s0SD1cq5021257; Tue, 28 Jan 2014 22:01:38 +0900 Message-ID: <52E7AA1A.7000008@lab.ntt.co.jp> Date: Tue, 28 Jan 2014 22:01:14 +0900 From: Etsuro Fujita User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Shigeru Hanada CC: PostgreSQL-development Subject: Re: [Review] inherit support for foreign tables References: <52E11225.2080907@lab.ntt.co.jp> <52E5D9AD.4000202@lab.ntt.co.jp> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: No X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org (2014/01/27 21:49), Shigeru Hanada wrote: > 2014-01-27 Etsuro Fujita : >> (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