public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dave Cramer <[email protected]>
To: Tomas Vondra <[email protected]>
Cc: Konstantin Knizhnik <[email protected]>
Cc: Ryan Lambert <[email protected]>
Cc: Thomas Munro <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: Bruce Momjian <[email protected]>
Cc: Dimitri Fontaine <[email protected]>
Subject: Re: Built-in connection pooler
Date: Sat, 27 Jul 2019 06:40:00 -0400
Message-ID: <CADK3HHLj5_69m-MEh2cC0oTz+Cn_rXm1FtP52q-1+tbrGLYbjA@mail.gmail.com> (raw)
In-Reply-To: <20190726202437.2svtvcisiujqaoky@development>
References: <[email protected]>
	<CA+hUKGJ-mm50BXGgo-w2AnnPJTCydbzJifSHUOSimBfcG1Xw=g@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<CAN-V+g8h5HFQj_Y7HzFvcuCzOL=F8VDadNxCwQ8exkKOYB8KJA@mail.gmail.com>
	<[email protected]>
	<CAN-V+g--21y8=GhWFoTGqU0UKxSgp0ZFKAMZM2KbcDjey-Ty8w@mail.gmail.com>
	<[email protected]>
	<CAN-V+g99RvCr5GCRkn_H6k2Mom76HcAqFrfzQxuFNEa-Hip5Mw@mail.gmail.com>
	<[email protected]>
	<20190726202437.2svtvcisiujqaoky@development>

Responses inline. I just picked up this thread so please bear with me.

On Fri, 26 Jul 2019 at 16:24, Tomas Vondra <[email protected]>
wrote:

> Hi Konstantin,
>
> I've started reviewing this patch and experimenting with it, so let me
> share some initial thoughts.
>
>
> 1) not handling session state (yet)
>
> I understand handling session state would mean additional complexity, so
> I'm OK with not having it in v1. That being said, I think this is the
> primary issue with connection pooling on PostgreSQL - configuring and
> running a separate pool is not free, of course, but when people complain
> to us it's when they can't actually use a connection pool because of
> this limitation.
>
> So what are your plans regarding this feature? I think you mentioned
> you already have the code in another product. Do you plan to submit it
> in the pg13 cycle, or what's the plan? I'm willing to put some effort
> into reviewing and testing that.
>

I too would like to see the plan of how to make this feature complete.

My concern here is that for the pgjdbc client at least *every* connection
does some set parameter so I see from what I can tell from scanning this
thread pooling would not be used at all.I suspect the .net driver does the
same thing.



> FWIW it'd be nice to expose it as some sort of interface, so that other
> connection pools can leverage it too. There are use cases that don't
> work with a built-in connection pool (say, PAUSE/RESUME in pgbouncer
> allows restarting the database) so projects like pgbouncer or odyssey
> are unlikely to disappear anytime soon.
>

Agreed, and as for other projects. I see their value in having the pool on
a separate host as being a strength.  I certainly don't see them going
anywhere soon. Either way having a unified pooling API would be a useful
goal.



> I also wonder if we could make it more permissive even in v1, without
> implementing dump/restore of session state.
>
> Consider for example patterns like this:
>
>   BEGIN;
>   SET LOCAL enable_nestloop = off;
>   ...
>   COMMIT;
>
> or
>
>   PREPARE x(int) AS SELECT ...;
>   EXECUTE x(1);
>   EXECUTE x(2);
>   ...
>   EXECUTE x(100000);
>   DEALLOCATE x;
>

Again pgjdbc does use server prepared statements so I'm assuming this would
not work for clients using pgjdbc or .net

Additionally we have setSchema, which is really set search_path, again
incompatible.

Regards,

Dave

>
>


view thread (72+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Built-in connection pooler
  In-Reply-To: <CADK3HHLj5_69m-MEh2cC0oTz+Cn_rXm1FtP52q-1+tbrGLYbjA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox