From: | Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: inherit support for foreign tables |
Date: | 2015-04-16 03:20:47 |
Message-ID: | 552F2A8F.2090406@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2015-04-16 03:33:25 | Re: PATCH: default_index_tablespace |
Previous Message | Stephen Frost | 2015-04-16 02:44:48 | Re: PATCH: default_index_tablespace |