Re: pgsql_fdw, FDW for PostgreSQL server
Shigeru Hanada <shigeru.hanada@gmail.com>
From: Shigeru Hanada <shigeru.hanada@gmail.com>
To: Albe Laurenz <laurenz.albe@wien.gv.at>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>,
Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Kohei KaiGai <kaigai@kaigai.gr.jp>, Martijn van Oosterhout <kleptog@svana.org>, Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>, Hitoshi Harada <umi.tanuki@gmail.com>
Date: 2012-03-10T03:35:52Z
Lists: 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