pg.ddx.io pgsql-performance@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Hannu Krosing <hannu@krosing.net>
Cc: Craig Ringer <craig@postnewspapers.com.au>
Cc: Matthew Wakeling <matthew@flymine.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: Pooling in Core WAS: Need help in performance tuning.
Date: Sat, 24 Jul 2010 07:13:50 +0200
Message-ID: <20100724051350.GA22197@anarazel.de> (raw)
In-Reply-To: <AANLkTi=i+b2LbUj0QrvD_zzDW15KVmLpijawwS22KKYu@mail.gmail.com>
References: <AANLkTimNJZlX7kFH_r0-BB_K3NGorU7BHd85SxXJbuGJ@mail.gmail.com>
<4C38BF03.6060503@agliodbs.com>
<19244.1278787866@sss.pgh.pa.us>
<alpine.DEB.2.00.1007121044330.2534@aragorn.flymine.org>
<4C3AF564.5030204@postnewspapers.com.au>
<AANLkTinDgkzqf_=O+hk5OMq+AxN4G+fpfQZM4DBizAOF@mail.gmail.com>
<1279826144.14271.5.camel@hvost>
<AANLkTimLr9AoMMB_k9GWuEgoBZg1YWxR5OqKY-1Ugimc@mail.gmail.com>
<1279900707.26952.4.camel@hvost>
<AANLkTi=i+b2LbUj0QrvD_zzDW15KVmLpijawwS22KKYu@mail.gmail.com>
On Fri, Jul 23, 2010 at 01:28:53PM -0400, Robert Haas wrote:
> On Fri, Jul 23, 2010 at 11:58 AM, Hannu Krosing <hannu@krosing.net> wrote:
> > On Thu, 2010-07-22 at 20:57 -0400, Robert Haas wrote:
> >> On Thu, Jul 22, 2010 at 3:15 PM, Hannu Krosing <hannu@krosing.net> wrote:
> >> > On Thu, 2010-07-22 at 14:36 -0400, Robert Haas wrote:
> >> >> On Mon, Jul 12, 2010 at 6:58 AM, Craig Ringer
> >> >> <craig@postnewspapers.com.au> wrote:
> >> >> > So rather than asking "should core have a connection pool" perhaps
> >> >> > what's needed is to ask "what can an in-core pool do that an external
> >> >> > pool cannot do?"
> >> >>
> >> >> Avoid sending every connection through an extra hop.
> >> >
> >> > not really. in-core != magically-in-right-backend-process
> >>
> >> Well, how about if we arrange it so it IS in the right backend
> >> process? I don't believe magic is required.
> >
> > Do you have any design in mind, how you can make it so ?
>
> Well, if we could change the backends so that they could fully
> reinitialize themselves (disconnect from a database to which they are
> bound, etc.), I don't see why we couldn't use the Apache approach.
> There's a danger of memory leaks but that's why Apache has
> MaxRequestsPerChild, and it works pretty darn well. Of course,
> passing file descriptors would be even nicer (you could pass the
> connection off to a child that was already bound to the correct
> database, perhaps) but has pointed out more than once, that's not
> portable.
Its not *that bad* though. To my knowledge its 2 or 3 implementations that
one would need to implement to support most if not all platforms.
- sendmsg/cmsg/SCM_RIGHTS based implementation (most if not all *nixes
including solaris, linux, (free|open|net)bsd, OSX, AIX, HPUX, others)
- WSADuplicateSocket (windows)
- if needed: STREAMS based stuff (I_SENDFD) (at least solaris, hpux, aix, tru64,
irix, unixware allow this)
Note that I am still not convinced that its a good idea...
Andres
view thread (59+ messages) latest in thread
Message-ID: <20100724051350.GA22197@anarazel.de> Permalink: ../20100724051350.GA22197@anarazel.de/ Also on: postgresql.org/message-id/20100724051350.GA22197@anarazel.de ·
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: pgsql-performance@postgresql.org Cc: andres@anarazel.de, robertmhaas@gmail.com, hannu@krosing.net, craig@postnewspapers.com.au, matthew@flymine.org Subject: Re: Pooling in Core WAS: Need help in performance tuning. In-Reply-To: <20100724051350.GA22197@anarazel.de> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox