Re: [HACKERS] file descriptors leak?

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gene Sokolov <hook(at)aktrad(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] file descriptors leak?
Date: 1999-11-02 18:35:22
Message-ID: 199911021835.NAA13619@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Tue, 2 Nov 1999, Tom Lane wrote:
>
> > Date: Tue, 02 Nov 1999 10:18:15 -0500
> > From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> > To: Gene Sokolov <hook(at)aktrad(dot)ru>
> > Cc: pgsql-hackers(at)postgreSQL(dot)org
> > Subject: Re: [HACKERS] file descriptors leak?
> >
> > "Gene Sokolov" <hook(at)aktrad(dot)ru> writes:
> > > We disconnected all clients and the number of descriptors dropped from 800
> > > to about 200, which is reasonable. We currently have 3 connections and ~300
> > > used descriptors. The "lsof -u postgres" is attached.
> >
> > Hmm, I see a postmaster with 8 open files and one backend with 34.
> > Doesn't look out of the ordinary to me.
>
> I see 617 open files (using lsof| grep post | wc).
> This is a Linux 2.0.37, postgres 6.5.3, 1 postamster and
> 10 backends. I already complained about this and would glad
> to understand now is it ok or postgres just wast fd ?

PostgreSQL caches up to 64 file descriptors per backend, meaning it keep
them open in case it needs them later. The 617 number for 10 backend
sounds just about right.

--
Bruce Momjian | http://www.op.net/~candle
maillist(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-hackers by date

  From Date Subject
Next Message Aaron J. Seigo 1999-11-02 18:47:34 Fwd: Re: fs/etx2/file.c question from postgres developers...
Previous Message Lamar Owen 1999-11-02 18:24:04 Re: [HACKERS] 6.5.3 is ready