Re: [HACKERS] Postmaster options, process spawning, logging, etc.

Поиск
Список
Период
Сортировка
От Don Baccus
Тема Re: [HACKERS] Postmaster options, process spawning, logging, etc.
Дата
Msg-id 3.0.1.32.19991215154059.010a17e0@mail.pacifier.com
обсуждение исходный текст
Ответ на Postmaster options, process spawning, logging, etc.  (Matthew Hagerty <matthew@venux.net>)
Список pgsql-hackers
At 06:26 PM 12/15/99 -0500, Matthew Hagerty wrote:

>How many backend processes is considered a large number?  The man pages
>says the default is 32.  Does anyone set their number higher?

That would depend on your situation.  I use AOLserver to service
my web site.  It maintains a pool of persistent connections and
I throttle the number of connections to the database via the
web server.  So, I like having a high limit on backend processes
for the postmaster itself, and 32 suits me fine.  I like throttling
at the webserver level because I can throttle on individual virtual
servers, etc.

>Kind of related to the question above; when does the postmaster spawn
>another backend process?  Is it for each additional connection,

Yes.  Each connection.  I assume your PHP environment includes some
means to allocate a database handle either out of a persistent pool
or otherwise.  Each time that pool mechanism opens a database
connection the postmaster forks a new backend process.  It goes
away when you close a connection (normally, unless the backend
crashes etc).

> or will
>each backend process handle several connections/queries before another
>process is started?

Once forked, the process stays alive until the connection's closed.
You can feed that process as many queries as you want in serial
fashion.

However, in practice, the API you're using to connect PHP to the
database may or may not pool persistent connections.  In this case,
it will probably be shutting down and reopening connections 
frequently, say once per web page or the like.

I'll leave your other questions to folks who know more about
postgres specifics.



- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] Postmaster options, process spawning, logging, etc.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Postmaster options, process spawning, logging, etc.