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

From Kevin Grittner
Subject Re: Separate connection handling from backends
Date
Msg-id CACjxUsNk9=xs-rkOiFy6Hw3e5WK_76y+0giqZCzfFxHtzPttOg@mail.gmail.com
Whole thread Raw
In response to Re: Separate connection handling from backends  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: Separate connection handling from backends  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
On Wed, Dec 7, 2016 at 12:36 AM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:

> The way I'm picturing it backends would no longer be directly
> tied to connections. The code that directly handles connections
> would grab an available backend when a statement actually came in
> (and certainly it'd need to worry about transactions and session
> GUCs).

If we're going to consider that, I think we should consider going
all the way to the technique used by many (most?) database
products, which is to have a configurable number of "engines" that
pull work requests from queues.  We might have one queue for disk
writes, one for disk reads, one for network writes, etc.
Traditionally, each engine spins over attempts to read from the
queues until it finds a request to process; blocking only if
several passes over all queues come up empty.  It is often possible
to bind each engine to a particular core.  Current process-local
state would be passed around, attached to queued requests, in a
structure associated with the connection.

I don't know how that execution model would compare to what we use
now in terms of performance, but its popularity makes it hard to
ignore as something to consider.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Back-patch use of unnamed POSIX semaphores for Linux?
Next
From: Stephen Frost
Date:
Subject: Re: Back-patch use of unnamed POSIX semaphores for Linux?