pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rbiro@interfacefinancial.com
To: pgsql-bugs@postgresql.org
Cc: rbiro@interfacefinancial.com
Subject: BUG #14770: postgres_fdw assumes foreign table is in postgres
Date: Thu, 03 Aug 2017 14:11:47 +0000
Message-ID: <20170803141147.8424.6951@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      14770
Logged by:          Ross Biro
Email address:      rbiro@interfacefinancial.com
PostgreSQL version: 9.6.3
Operating system:   Linux
Description:        

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.
Import the foreign table from a into b using postgres_fdw.  Run update
querries on the table in b.  Check the querries run against a.

Expected: Ideally postgres_fdw would check if the remote table is foreign
and if so, just pass the SQL through, or generate an error.

We don't actually need this functionality, but bugs in our system sometimes
cause a foreign table to be mapped to a foreign table.  When that happens,
it's hard to diagnose and causes unexpected results, include data loss in
one instance.*

*While postgres_fdw did cause data loss, we were able to retrieve it all
though Postrgres's point in time restore.  So overall, using Postgres was a
win for us in this case.




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


view thread (3+ messages)  latest in thread

Message-ID: <20170803141147.8424.6951@wrigleys.postgresql.org>
Permalink:  ../20170803141147.8424.6951@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20170803141147.8424.6951@wrigleys.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: rbiro@interfacefinancial.com
  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>

* 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