Re: Using Threads?
Marc G. Fournier <scrappy@hub.org>
From: The Hermit Hacker <scrappy@hub.org>
To: Junfeng Zhang <junfengz@cae.wisc.edu>
Cc: pgsql-hackers@postgresql.org
Date: 2000-12-04T12:55:53Z
Lists: pgsql-hackers
On Mon, 27 Nov 2000, Junfeng Zhang wrote: > Hello all, > > I am new to postgreSQL. When I read the documents, I find out the > Postmaster daemon actual spawns a new backend server process to serve > a new client request. Why not use threads instead? Is that just for a > historical reason, or some performance/implementation concern? Several reasons, 'historical' probably being the strongest right now ... since PostgreSQL was never designed for threading, its about as 'un-thread-safe' as they come, and cleaning that up will/would be a complete nightmare (should eventually be done, mind you) ... The other is stability ... right now, if one backend drops away, for whatever reason, it doesn't take down the whole system ... if you ran things as one process, and that one process died, you just lost your whole system ...