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-06T12:37:20Z
Lists: pgsql-hackers

Attachments

(2012/03/06 19:09), Albe Laurenz wrote:
> I know this is not the latest version, but I played around with it and
> tickled a bug.
> It seems to have a problem with rolled back subtransactions.

Thanks for the report!

The problem was in cleanup_connection, which is called at end of
transactions.  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.

Attached patches also contains changes to catch up to the redesign of
PlanForeignScan.

Regards,
-- 
Shigeru Hanada