Re: Warning: Don't delete those /tmp/.PGSQL.* files - Mailing list pgsql-general

From Tom Lane
Subject Re: Warning: Don't delete those /tmp/.PGSQL.* files
Date
Msg-id 8364.975536862@sss.pgh.pa.us
Whole thread Raw
In response to Re: Warning: Don't delete those /tmp/.PGSQL.* files  (GH <grasshacker@over-yonder.net>)
List pgsql-general
GH <grasshacker@over-yonder.net> writes:
> running this script with "start" causes the postgres server to start,
> run out of files, and then shutdown. Postgres is useable until it runs
> out of files and shuts down.

Continuing on that line of thought --- it seems like this must be an
indication of a file-descriptor leak somewhere.  That is, some bit of
code forgets to close a file it opened.  Cycle through that bit of code
enough times, and the kernel stops being willing to give you more file
descriptors.

If this is correct, we could probably identify the leak by knowing what
file is being opened multiple times.  Can you run 'lsof' or some similar
tool to check for duplicate descriptors being held open by the
postmaster?

I recall that we have fixed one or two leaks of this kind in the past,
but I don't recall details, nor which versions the fixes first appeared
in.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: how to determine what a process is doing
Next
From: "Joel Burton"
Date:
Subject: Re: Unanswered questions about Postgre