[BUGS] BUG #14770: postgres_fdw assumes foreign table is in postgres

Поиск
Список
Период
Сортировка
От rbiro@interfacefinancial.com
Тема [BUGS] BUG #14770: postgres_fdw assumes foreign table is in postgres
Дата
Msg-id 20170803141147.8424.6951@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: [BUGS] BUG #14770: postgres_fdw assumes foreign table is in postgres  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] information_schema.columns.character_octet_length unavailable if no access to pg_database
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] "could not open relation with OID XXX" when using recreated index in sql function