From: | Don Baccus <dhogaza(at)pacifier(dot)com> |
---|---|
To: | Matthew Hagerty <matthew(at)venux(dot)net>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Postmaster options, process spawning, logging, etc. |
Date: | 1999-12-15 23:40:59 |
Message-ID: | 3.0.1.32.19991215154059.010a17e0@mail.pacifier.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)pacifier(dot)com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 1999-12-15 23:43:34 | Re: [HACKERS] Postmaster options, process spawning, logging, etc. |
Previous Message | Matthew Hagerty | 1999-12-15 23:40:40 | Finding corrupt data |