From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Bruce Guenter <bruceg(at)em(dot)ca> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Using Threads? |
Date: | 2000-12-09 05:20:33 |
Message-ID: | 200012090520.AAA14626@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
-- Start of PGP signed section.
> On Mon, Nov 27, 2000 at 11:42:24PM -0600, Junfeng Zhang wrote:
> > 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?
>
> Once all the questions regarding "why not" have been answered, it would
> be good to also ask "why use threads?" Do they simplify the code? Do
> they offer significant performance or efficiency gains? What do they
> give, other than being buzzword compliant?
Good question. I have added this to the developers FAQ:
---------------------------------------------------------------------------
14) Why don't we use threads in the backend?
There are several reasons threads are not used:
Historically, threads were unsupported and buggy.
An error in one backend can corrupt other backends.
Speed improvements using threads are small compared to the
remaining backend startup time.
The backend code would be more complex.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2000-12-09 05:22:34 | Re: Using Threads? |
Previous Message | Bruce Momjian | 2000-12-09 05:19:27 | Re: Using Threads? |