Re: Many postmasters...

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Many postmasters...
Дата
Msg-id 200012102229.RAA07050@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Many postmasters...  (Lamar Owen <lamar.owen@wgcr.org>)
Список pgsql-general
> Yes, this would be normal.  Due to the fork nature of the backend, you
> will see with ps, depending upon traffic, the actual postmaster fork
> before the backend (postgres) is exec'd. I don't see that here due to my
> use of a pooling webserver, but non-pooled situations will have backends

We don't do any exec since 6.4 I think, just fork().

I think the reason is shows postmaster for backends is because the part
of the process containing the ps args is paged out, and ps will not page
it in to get the args, it will simply print the name of the binary that
initially started the process.  Not a problem.


> >   case, about 80 including the indexes) and many backends will finally
> >   generate an "Too many files open" message. We first increased the
> >   /proc/sys/fs/file-max to 8192 but that's a lot !
>
> >   The apache/php server always uses the same connect parameters for
> >   every page but it seems php's pg_pconnect() behaves just like
> >   pg_connect. Shouldn't we have apache hold a few backends connected ?
>

PostgreSQL keeps most files open in a LIFO manner to prevent the
overhead of re-opening files it just closed.  I think it keeps the last
64 file open, but you can configure that lower if needed.

--
  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, Pennsylvania 19026

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Where do COMMENTs on columns go?
Следующее
От: Uro¹ Gruber
Дата:
Сообщение: Problems with starting Postgres