Re: Pre-forking backend

Поиск
Список
Период
Сортировка
От Lincoln Yeoh
Тема Re: Pre-forking backend
Дата
Msg-id 3.0.5.32.20010930095444.015ed1c0@192.228.128.13
обсуждение исходный текст
Ответ на Re: Pre-forking backend  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
At 04:50 PM 9/29/01 -0400, Tom Lane wrote:
>Bruce Momjian <pgman@candle.pha.pa.us> writes:
>>> On some operating systems, only one child at a time can accept() on the
>>> socket.  On these, you have to lock around the call to accept().
>
>> But how do you know the client wants the database you have forked?  They
>> could want a different one.
>
>This approach would only work as far as saving the fork() call itself,
>not the backend setup time.  Not sure it's worth the trouble.  I doubt
>that the fork itself is a huge component of our start time; it's setting
>up all the catalog caches and so forth that's expensive.

I don't think there's much benefit as well.

For most cases where preforking would help, you could just simply not
disconnect. Get the app to connect to the correct DB on startup and then
just wait, do stuff then don't disconnect either rollback or commit. Or
have a DB connection pool.

What would be good is a DB that can handle lots of connections well. That
would help almost any case.

Preforking is good for web servers but for DB servers it doesn't seem as
useful.

Cheerio,
Link.



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: doc build error
Следующее
От: Justin Clift
Дата:
Сообщение: Re: Spinlock performance improvement proposal