postgres_fdw and connection management

From: Sandro Santilli <strk(at)keybit(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: postgres_fdw and connection management
Date: 2014-05-23 11:09:07
Message-ID: 20140523110907.GF6655@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm evaluating use of the postgres FDW to keep in sync a central database
to changes made in thousand other databases, via triggers.

But as long as postgres_fdw keeps connections open for the whole lifetime
of a session this conflicts with large use of poolers which make sessions
virtually never expire.

Is there any way to ask the postgres_fdw to close connections at the
end of a transaction ? Or would it be possible at all to do from a
FDW handler ? Do you see any drawback in doing that ?

I'm willing to work on a patch, maybe accepting an additional OPTION,
if you agree on the idea.

--strk;

()  ASCII ribbon campaign -- Keep it simple !
/\  http://strk.keybit.net/rants/ascii_mails.txt

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-05-23 11:20:12 Re: -DDISABLE_ENABLE_ASSERT
Previous Message Shigeru Hanada 2014-05-23 09:29:55 fix worker_spi to run as non-dynamic background worker