pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: Shigeru Hanada <shigeru.hanada@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: inherit support for foreign tables
Date: Tue, 14 Apr 2015 12:31:15 -0500
Message-ID: <552D4EE3.3060708@BlueTreble.com> (raw)
In-Reply-To: <552CF0B6.8010006@lab.ntt.co.jp>
References: <543D0261.6020803@lab.ntt.co.jp>
	<54461BEB.9000707@lab.ntt.co.jp>
	<5449EE98.1040704@lab.ntt.co.jp>
	<20141107.145713.169337282.horiguchi.kyotaro@lab.ntt.co.jp>
	<545CB4A2.1030303@lab.ntt.co.jp>
	<CAFjFpRcVLtU6jE8h_N1Rc+Y-pDFbmR7YvBvxOXg6aTFrbZ1Z8Q@mail.gmail.com>
	<54645499.7050709@lab.ntt.co.jp>
	<CAFjFpRcBFVO0YP0nmfygpJOFfWKMkAN1Z8JmrkwyEWXDyMt5Hw@mail.gmail.com>
	<CAFjFpRcd=F8Jqx+9yioHKVUA71LXBxO41ia61acjzyzQ4MZqVQ@mail.gmail.com>
	<5476FB4B.9060705@lab.ntt.co.jp>
	<CAFjFpRd6PR3Seg8D3t-XcXGxXyb+p2WDsk_wBGge7b=PyzP_Qw@mail.gmail.com>
	<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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

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.

What happens when the foreign side breaks the inheritance? Does the FDW
somehow know to check that fact for each query?

What do you gain from having the local table have inheritance?

Basically, I think we have to be very careful about implementing
features that imply the local side knows something about the persisted
state of the remote side (in this case, whether there's inheritance).
Anything like that sets us up for synchronization problems.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (179+ messages)  latest in thread

Message-ID: <552D4EE3.3060708@BlueTreble.com>
Permalink:  ../552D4EE3.3060708@BlueTreble.com/
Also on:    postgresql.org/message-id/552D4EE3.3060708@BlueTreble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: Jim.Nasby@BlueTreble.com, fujita.etsuro@lab.ntt.co.jp, tgl@sss.pgh.pa.us, ashutosh.bapat@enterprisedb.com, horiguchi.kyotaro@lab.ntt.co.jp, hlinnakangas@vmware.com, noah@leadboat.com, shigeru.hanada@gmail.com
  Subject: Re: inherit support for foreign tables
  In-Reply-To: <552D4EE3.3060708@BlueTreble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox