Re: Built-in connection pooling - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: Built-in connection pooling
Date
Msg-id CAHyXU0wD3pZyf_7RdsaaS82v5J6+S2TAbhOxSC7qkmGvO8ecGQ@mail.gmail.com
Whole thread Raw
In response to Re: Built-in connection pooling  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Built-in connection pooling
Re: Built-in connection pooling
List pgsql-hackers
On Mon, Apr 23, 2018 at 3:14 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> In other words, transparent connection pooling is going to require
> some new mechanism, which third-party code will have to know about,
> for tracking every last bit of session state that might need to be
> preserved or cleared.  That's going to be a big project.  Maybe some
> of that can piggyback on existing infrastructure like
> InvalidateSystemCaches(), but there's probably still a ton of ad-hoc
> state to deal with.  And no out-of-core pooler has a chance of
> handling all that stuff correctly; an in-core pooler will be able to
> do so only with a lot of work.

Why does it have to be completely transparent?  As long as the feature
is optional (say, a .conf setting) the tradeoffs can be managed.  It's
a reasonable to expect to exchange some functionality for pooling;
pgbouncer provides a 'release' query (say, DISCARD ALL)  to be called
upon release back to the pool.  Having session state objects (not all
of which we are talking about; advisory locks and notifications
deserve consideration) 'just work' would be wonderful but ought not to
hold up other usages of the feature.

merlin


pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: [HACKERS] Clock with Adaptive Replacement
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Runtime Partition Pruning