Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 153ED1BFF91C for ; Fri, 6 Apr 2012 16:20:08 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SGEhb-0007kC-9m for pgsql-hackers@postgresql.org; Fri, 06 Apr 2012 19:20:07 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q36JJp9Q012200; Fri, 6 Apr 2012 15:19:51 -0400 (EDT) To: Shigeru HANADA cc: Etsuro Fujita , pgsql-hackers@postgresql.org Subject: Re: WIP: Collecting statistics on CSV file data In-reply-to: <4F7E57D9.3000807@gmail.com> References: <4E6DE18B.4010505@lab.ntt.co.jp> <4E7861C1.2000607@gmail.com> <4E8EC1D8.3080700@lab.ntt.co.jp> <4E9C6573.8050507@gmail.com> <4E9FF04B.3050504@lab.ntt.co.jp> <4EB7C07A.5030205@gmail.com> <4EC60883.2050905@lab.ntt.co.jp> <4EC648CA.5050904@gmail.com> <4EC9CBC5.3070500@lab.ntt.co.jp> <4EE1FC38.5080707@lab.ntt.co.jp> <4EE5D862.1080809@gmail.com> <4EE74C5F.3000309@lab.ntt.co.jp> <4F7D8BBF.4050004@gmail.com> <4F7E57D9.3000807@gmail.com> Comments: In-reply-to Shigeru HANADA message dated "Fri, 06 Apr 2012 11:41:29 +0900" Date: Fri, 06 Apr 2012 15:19:51 -0400 Message-ID: <12199.1333739991@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/321 X-Sequence-Number: 206124 Shigeru HANADA writes: > Just after my post, Fujita-san posted another v7 patch[1], so I merged > v7 patches into v8 patch. I've committed a modified version of this, but right after pushing it I had a better idea about what the AnalyzeForeignTable API should do. An issue that I'd not previously figured out is how analysis of an inheritance tree could deal with foreign-table members, because it wants to estimate the members' sizes before collecting the actual sample rows. However, given that we've got the work split into a precheck phase and a sample collection phase, that's not hard to solve: we could insist that the FDW give back a size estimate in the precheck phase not the sample collection phase. I'm off to fix that up ... regards, tom lane