Re: Using Threads?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Using Threads?
Дата
Msg-id 200012090520.AAA14626@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Using Threads?  (Bruce Guenter <bruceg@em.ca>)
Список 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
improvementsusing threads are small compared to the      remaining backend startup time.     The backend code would be
morecomplex. 
 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Using Threads?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Using Threads?