Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YiaNX-0002Ss-3L for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Apr 2015 03:22:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YiaNW-0006zp-3w for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Apr 2015 03:22:10 +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 1YiaNT-0006zg-Py for pgsql-hackers@postgresql.org; Thu, 16 Apr 2015 03:22:07 +0000 Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YiaNJ-0001Fx-Fm for pgsql-hackers@postgresql.org; Thu, 16 Apr 2015 03:22:05 +0000 Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id t3G3LEui012844; Thu, 16 Apr 2015 12:21:14 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id B7AD75F631; Thu, 16 Apr 2015 12:21:14 +0900 (JST) Received: from imail3.m.ecl.ntt.co.jp (imail3.m.ecl.ntt.co.jp [129.60.5.248]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id A758F5F594; Thu, 16 Apr 2015 12:21:14 +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 t3G3LDje031282; Thu, 16 Apr 2015 12:21:14 +0900 Message-ID: <552F2A8F.2090406@lab.ntt.co.jp> Date: Thu, 16 Apr 2015 12:20:47 +0900 From: Etsuro Fujita User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Alvaro Herrera , Jim Nasby CC: Tom Lane , Ashutosh Bapat , Kyotaro HORIGUCHI , Heikki Linnakangas , Noah Misch , Shigeru Hanada , pgsql-hackers Subject: Re: inherit support for foreign tables References: <5487BB9D.7070605@lab.ntt.co.jp> <30555.1418853840@sss.pgh.pa.us> <5497FE79.7090804@lab.ntt.co.jp> <19367.1419262577@sss.pgh.pa.us> <54B76DD2.1040106@lab.ntt.co.jp> <54E6DB4E.40801@lab.ntt.co.jp> <21104.1427047056@sss.pgh.pa.us> <552CF0B6.8010006@lab.ntt.co.jp> <552D4EE3.3060708@BlueTreble.com> <20150414185218.GX4369@alvh.no-ip.org> In-Reply-To: <20150414185218.GX4369@alvh.no-ip.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable 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 On 2015/04/15 3:52, Alvaro Herrera wrote: >> On 4/14/15 5:49 AM, Etsuro Fujita wrote: >>> postgres=# create foreign table ft1 (c1 int) server myserver options >>> (table_name 't1'); >>> CREATE FOREIGN TABLE >>> postgres=# create foreign table ft2 (c1 int) server myserver options >>> (table_name 't2'); >>> CREATE FOREIGN TABLE >>> postgres=# alter foreign table ft2 inherit ft1; >>> ALTER FOREIGN TABLE >>> postgres=# select * from ft1 for update; >>> ERROR: could not find junk tableoid1 column >>> >>> I think this is a bug. Attached is a patch fixing this issue. > I think the real question is whether we're now (I mean after this patch) > emitting useless tableoid columns that we didn't previously have. I > think the answer is yes, and if so I think we need a smaller comb to fix > the problem. This one seems rather large. My answer for that would be *no* because I think tableoid would be needed for EvalPlanQual checking in more complex SELECT FOR UPDATE on the inheritance or UPDATE/DELETE involving the inheritance as a source table. Also, if we allow the FDW to change the behavior of SELECT FOR UPDATE so as to match the local semantics exactly, which I'm working on in another thread, I think tableoid would also be needed for the actual row locking. 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