Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddIQ6-0008AP-7r for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Aug 2017 15:52:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ddIQ5-0003D7-Ql for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Aug 2017 15:52:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ddIQ5-0003Au-3Y for pgsql-bugs@postgresql.org; Thu, 03 Aug 2017 15:52:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ddIQ1-0004Cc-Sg for pgsql-bugs@postgresql.org; Thu, 03 Aug 2017 15:52:16 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v73FqAaC016640; Thu, 3 Aug 2017 11:52:10 -0400 From: Tom Lane To: rbiro@interfacefinancial.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14770: postgres_fdw assumes foreign table is in postgres In-reply-to: <20170803141147.8424.6951@wrigleys.postgresql.org> References: <20170803141147.8424.6951@wrigleys.postgresql.org> Comments: In-reply-to rbiro@interfacefinancial.com message dated "Thu, 03 Aug 2017 14:11:47 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16638.1501775530.1@sss.pgh.pa.us> Date: Thu, 03 Aug 2017 11:52:10 -0400 Message-ID: <16639.1501775530@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org rbiro@interfacefinancial.com writes: > Using postgres_fdw seems to assume that the foreign table is not also a > foreign table in the remote db. > Symptoms: connections closing with little or no error message, requesting > ctid from a foreign table that doesn't have a ctid, even dataloss iin one > instance*. > Reproduce: create two Postgresql databases, a and b. Create a foreign table > in a using a fdw other than postgres_fdw. Multicorn is a good choice since > it is then easy to see everything. Without a concrete test case, it's really hard to prove anything about this, or even to tell which component the problem is in. But a desultory test using two levels of postgres_fdw seemed to work, which suggests that you need to take this up with the multicorn authors. contrib_regression=# create table base (a int, b text); CREATE TABLE contrib_regression=# create foreign table level1 (a int, b text) server loopback options(schema_name 'public', table_name 'base'); CREATE FOREIGN TABLE contrib_regression=# create foreign table level2 (a int, b text) server loopback options(schema_name 'public', table_name 'level1'); CREATE FOREIGN TABLE contrib_regression=# insert into level2 values(42, 'foo'); INSERT 0 1 contrib_regression=# select * from base; a | b ----+----- 42 | foo (1 row) contrib_regression=# update level2 set b = 'bar' where a = 42; UPDATE 1 contrib_regression=# select * from base; a | b ----+----- 42 | bar (1 row) regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs