Re: Trouble with postgres_fdw & dblink extensions - Mailing list pgsql-general

From Tom Lane
Subject Re: Trouble with postgres_fdw & dblink extensions
Date
Msg-id 3232.1542325521@sss.pgh.pa.us
Whole thread Raw
In response to Trouble with postgres_fdw & dblink extensions  (Lukáš Sobotka <sobotka.luk@gmail.com>)
List pgsql-general
=?UTF-8?B?THVrw6HFoSBTb2JvdGth?= <sobotka.luk@gmail.com> writes:
> I would be grateful for some help. I am writing you because I am confused
> about using data foreign wrappers and dblink. I attached simplified script
> describing the problem.

I think what is happening is that postgres_fdw starts a transaction on
its connection as soon as it's asked to do something, and then the CREATE
TABLE executed on dblink's separate connection isn't visible to that
already-in-progress transaction.

That theory only holds up if you are running in serializable mode (which
postgres_fdw would then also use for its remote transaction).  Which you
didn't say, but it's hard to see how it'd fail otherwise.

            regards, tom lane


pgsql-general by date:

Previous
From: Lukáš Sobotka
Date:
Subject: Trouble with postgres_fdw & dblink extensions
Next
From: Adrian Klaver
Date:
Subject: Re: Trouble with postgres_fdw & dblink extensions