Re: Pre-forking backend

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Pre-forking backend
Дата
Msg-id 200110121629.f9CGTRv03399@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Pre-forking backend  (Doug McNaught <doug@wireboard.com>)
Ответы Re: Pre-forking backend  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
> Gavin Sherry <swm@linuxworld.com.au> writes:
> 
> > This aside, isn't it possible to just copy the socket and some
> > data about the database required into shared memory and have the preforked
> > children pick the socket up from there.
> 
> Ummm....  No.  There's no Unix API for doing so.
> 
> You can pass open file descriptors across Unix domain sockets on most
> systems, which is a possible way to address the problem, but probably
> not worth it for the reasons discussed earlier.

OK, let's assume we have pre-forked backends that do the accept().  One
enhancement would be for the child to connect to the last requested
database.  If the accept() user wants the same database, it is already
connected, or at least its cache is loaded.  If they want another one,
we can disconnect and connect to the database they request.  This would
be portable for all OS's because there is no file descriptor passing.

Added to TODO:

* Have pre-forked backend pre-connect to last requested database or pass file descriptor to backend pre-forked for
matchingdatabase
 
--  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 по дате отправления:

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: New contrib/tsearch module for 7.2
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Unicode combining characters