Re: Separate connection handling from backends - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Separate connection handling from backends
Date
Msg-id 31066.1481077164@sss.pgh.pa.us
Whole thread Raw
In response to Re: Separate connection handling from backends  (Greg Stark <stark@mit.edu>)
Responses Re: Separate connection handling from backends  (Craig Ringer <craig@2ndquadrant.com>)
Re: Separate connection handling from backends  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> On 5 December 2016 at 19:48, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
>> One solution to this would be to segregate connection handling from actual
>> backends, somewhere along the lines of separating the main loop from the
>> switch() that handles libpq commands. Benefits:

> I'm kind of mystified how a simple code restructuring could solve the
> fundamental problems with a large number of backends. It sounds like
> what you're describing would just push the problem around, you would
> end up with some other maximum instead, max_backends, or
> max_active_backends, or something like that with the same problems.

What it sounds like to me is building a connection pooler into the
backend.  I'm not really convinced we ought to go there.

> Heikki's work with CSN would actually address the main fundamental
> problem. Instead of having to scan PGPROC when taking a snapshot
> taking a snapshot would be O(1).

While that would certainly improve matters, I suspect there are still
going to be bottlenecks arising from too many backends.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] Select works only when connected from login postgres
Next
From: legrand legrand
Date:
Subject: Partitionning: support for Truncate Table WHERE