Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XKOiU-0000jL-93 for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Aug 2014 09:31:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XKOiT-0005Hd-ED for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Aug 2014 09:31:33 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XKOiO-00059M-NI for pgsql-hackers@postgresql.org; Thu, 21 Aug 2014 09:31:28 +0000 Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XKOiL-0004rl-2W for pgsql-hackers@postgresql.org; Thu, 21 Aug 2014 09:31:26 +0000 Received: from mfs6.rdh.ecl.ntt.co.jp (mfs6.rdh.ecl.ntt.co.jp [129.60.39.149]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id s7L9VK3h014043; Thu, 21 Aug 2014 18:31:20 +0900 Received: from mfs6.rdh.ecl.ntt.co.jp (localhost.localdomain [127.0.0.1]) by mfs6.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 4B98DE00FD; Thu, 21 Aug 2014 18:31:20 +0900 (JST) Received: from imail3.m.ecl.ntt.co.jp (imail3.m.ecl.ntt.co.jp [129.60.5.248]) by mfs6.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 40557E00FC; Thu, 21 Aug 2014 18:31:20 +0900 (JST) Received: from [129.60.241.75] ([129.60.241.75]) by imail3.m.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id s7L9VKme021394; Thu, 21 Aug 2014 18:31:20 +0900 Message-ID: <53F5BC47.3080000@lab.ntt.co.jp> Date: Thu, 21 Aug 2014 18:30:47 +0900 From: Etsuro Fujita User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Noah Misch , shigeru.hanada@gmail.com, Kyotaro HORIGUCHI CC: pgsql-hackers@postgresql.org Subject: Re: inherit support for foreign tables References: <53393E18.3080901@lab.ntt.co.jp> <533C01C7.6030809@lab.ntt.co.jp> <53706FB6.6000403@lab.ntt.co.jp> <20140620.170406.123403564.horiguchi.kyotaro@lab.ntt.co.jp> <20140702022327.GC1586927@tornado.leadboat.com> In-Reply-To: <20140702022327.GC1586927@tornado.leadboat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: No X-Pg-Spam-Score: -2.6 (--) 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/07/02 11:23), Noah Misch wrote: > On Fri, Jun 20, 2014 at 05:04:06PM +0900, Kyotaro HORIGUCHI wrote: >> Attached is the rebased patch of v11 up to the current master. > The rest of these review comments are strictly observations; they're not > requests for you to change the patch, but they may deserve more discussion. > > We use the term "child table" in many messages. Should that change to > something more inclusive, now that the child may be a foreign table? Perhaps > one of "child relation", plain "child", or "child foreign table"/"child table" > depending on the actual object? "child relation" is robust technically, but > it might add more confusion than it removes. Varying the message depending on > the actual object feels like a waste. Opinions? IMHO, I think that "child table" would not confusing users terribly. > LOCK TABLE on the inheritance parent locks child foreign tables, but LOCK > TABLE fails when given a foreign table directly. That's odd, but I see no > cause to change it. I agree wth that. > The longstanding behavior of CREATE TABLE INHERITS is to reorder local columns > to match the order found in parents. That is, both of these tables actually > have columns in the order (a,b): > > create table parent (a int, b int); > create table child (b int, a int) inherits (parent); > > Ordinary dump/reload always uses CREATE TABLE INHERITS, thereby changing > column order in this way. (pg_dump --binary-upgrade uses ALTER TABLE INHERIT > and some catalog hacks to avoid doing so.) I've never liked that dump/reload > can change column order, but it's tolerable if you follow the best practice of > always writing out column lists. The stakes rise for foreign tables, because > column order is inherently significant to file_fdw and probably to certain > other non-RDBMS FDWs. If pg_dump changes column order in your file_fdw > foreign table, the table breaks. I would heartily support making pg_dump > preserve column order for all inheritance children. That doesn't rise to the > level of being a blocker for this patch, though. I agree with that, too. I think it would be better to add docs for now. 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