Re: Many postmasters...

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
Cc: Jean-Christophe Boggio <cat(at)thefreecat(dot)org>, PGSQL-GENERAL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Many postmasters...
Date: 2000-12-10 22:29:07
Message-ID: 200012102229.RAA07050@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Uro Gruber 2000-12-10 22:32:43 Problems with starting Postgres
Previous Message Bruce Momjian 2000-12-10 22:12:10 Re: Open Source Article