Re: Pooling in Core WAS: Need help in performance tuning. - Mailing list pgsql-performance

From Tom Lane
Subject Re: Pooling in Core WAS: Need help in performance tuning.
Date
Msg-id 13654.1280263202@sss.pgh.pa.us
Whole thread Raw
In response to Re: Pooling in Core WAS: Need help in performance tuning.  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Pooling in Core WAS: Need help in performance tuning.
Re: Pooling in Core WAS: Need help in performance tuning.
List pgsql-performance
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Jul 22, 2010 at 5:29 PM, Andres Freund <andres@anarazel.de> wrote:
>>> The problem is harder for us because a backend can't switch identities
>>> once it's been assigned to a database. �I haven't heard an adequate
>>> explanation of why that couldn't be changed, though.

>> Possibly it might decrease the performance significantly enough by
>> reducing the cache locality (syscache, prepared plans)?

> Those things are backend-local.  The worst case scenario is you've got
> to flush them all when you reinitialize, in which case you still save
> the overhead of creating a new process.

"Flushing them all" is not zero-cost; it's not too hard to believe that
it could actually be slower than forking a clean new backend.

What's much worse, it's not zero-bug.  We've got little bitty caches
all over the backend, including (no doubt) some caching behavior in
third-party code that wouldn't get the word about whatever API you
invented to deal with this.

            regards, tom lane

pgsql-performance by date:

Previous
From: Yeb Havinga
Date:
Subject: Re: Slow query using the Cube contrib module.
Next
From: Josh Berkus
Date:
Subject: Re: how to handle a big table for data log