Re: pgsql_fdw, FDW for PostgreSQL server - Mailing list pgsql-hackers

From Shigeru Hanada
Subject Re: pgsql_fdw, FDW for PostgreSQL server
Date
Msg-id CAEZqfEdi-QzdngVKoTXpg8J7dzRBo2wiWdYCOCiKEaKEyywBJw@mail.gmail.com
Whole thread Raw
In response to Re: pgsql_fdw, FDW for PostgreSQL server  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
List pgsql-hackers
(2012/03/06 23:47), Albe Laurenz wrote:
> Shigeru Hanada wrote:
>>                 Connection should be closed only when the trigger is a
>> top level transaction and it's aborting, but isTopLevel flag was not
>> checked.  I fixed the bug and added regression tests for such cases.
>
> I wondered about that - is it really necessary to close the remote
> connection? Wouldn't a ROLLBACK on the remote connection be good enough?

Rolling back remote transaction seems enough, when the error comes
from local reason and remote connection is still available.  However,
I'd rather disconnect always to keep error handling simple and
centralized in cleanup_connection.

Regards,
-- 
Shigeru Hanada


pgsql-hackers by date:

Previous
From: Shigeru Hanada
Date:
Subject: Re: pgsql_fdw, FDW for PostgreSQL server
Next
From: Robert Haas
Date:
Subject: Re: lateral function as a subquery - WIP patch