pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Olivier Hubaut <olivier@scmbb.ulb.ac.be>
Cc: PgSQL Admin <pgsql-admin@postgresql.org>
Subject: Re: ANALYZE crashes randomly
Date: Fri, 20 Feb 2004 09:03:32 -0500
Message-ID: <27320.1077285812@sss.pgh.pa.us> (raw)
In-Reply-To: <4035EC17.10607@scmbb.ulb.ac.be>
References: <40349522.8090401@scmbb.ulb.ac.be>
	<1732.1077201014@sss.pgh.pa.us>
	<4035EC17.10607@scmbb.ulb.ac.be>

Olivier Hubaut <olivier@scmbb.ulb.ac.be> writes:
>>> PANIC:  could not open transaction-commit log directory 
>>> (/usr/local/pgsql/annot/pg_clog): Too many open files

> But it's amazing to me that i had to reduce it so much as the postmaster 
> is almost the only application running on this server.

Oh, wait, I bet you are running into the per-process open file limit not
the kernel limit.  The per-process limit is usually pretty low on
Darwin, and checking the code I see

    xldir = opendir(XLogDir);
    if (xldir == NULL)
        ereport(PANIC,
                (errcode_for_file_access(),
            errmsg("could not open transaction log directory \"%s\": %m",
                   XLogDir)));

That is, we don't have a fallback path to recover when the error is
ENFILE or EMFILE.  Looks to me like all the opendir() calls in the
backend ought to be handled by fd.c with code to release other open
files at need.

In the meantime, though, it seems fishy that Postgres wouldn't have
detected and allowed for the per-process file limit.  Which version of
OS X did you say you were using?

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <27320.1077285812@sss.pgh.pa.us>
Permalink:  ../27320.1077285812@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27320.1077285812@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, olivier@scmbb.ulb.ac.be
  Subject: Re: ANALYZE crashes randomly
  In-Reply-To: <27320.1077285812@sss.pgh.pa.us>
  References: <40349522.8090401@scmbb.ulb.ac.be> <1732.1077201014@sss.pgh.pa.us> <4035EC17.10607@scmbb.ulb.ac.be> <27320.1077285812@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox