Re: Scalability

From: Alexander Staubo <alex(at)purefiction(dot)net>
To: "Bill" <postgresql(at)dbginc(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Scalability
Date: 2006-10-29 00:52:34
Message-ID: F7141980-14FA-4A0D-9A84-10370C68846D@purefiction.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Oct 29, 2006, at 02:31 , Bill wrote:

> I was surprised to learn that PostgreSQL creates a new process for
> each
> connection. Doesn't this severely limit its scalability by consuming
> resources rapidly on the server as the number of user increases?

On Windows, yes; Win32 processes carry a not insignificant amount of
baggage with them, and you would probably want a connection pool
between your app and PostgreSQL in order to throttle the load.

PostgreSQL was designed and optimized for Unix, where processes are
lightweight, very fast to set up and come with added security
benefits such as protected address spaces. You will notice most
daemons follow this approach.

Some, like Apache 2.x, offer a hybrid approach with n threads
distributed over m processes. I suspect it would take a large
engineering effort to retrofit PostgreSQL to do this on Windows,
since a lot of PostgreSQL's internals probably aren't thread-safe,
but in theory it could work.

Alexander.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bill 2006-10-29 01:57:55 Re: Scalability
Previous Message Joshua D. Drake 2006-10-29 00:38:47 Re: Scalability