X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id CE22FD1D132 for ; Fri, 20 Feb 2004 14:03:38 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 84497-02 for ; Fri, 20 Feb 2004 10:03:32 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 8D34AD1E125 for ; Fri, 20 Feb 2004 10:03:28 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i1KE3Wd5027321; Fri, 20 Feb 2004 09:03:32 -0500 (EST) To: Olivier Hubaut Cc: PgSQL Admin Subject: Re: ANALYZE crashes randomly 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> Comments: In-reply-to Olivier Hubaut message dated "Fri, 20 Feb 2004 12:14:31 +0100" Date: Fri, 20 Feb 2004 09:03:32 -0500 Message-ID: <27320.1077285812@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/288 X-Sequence-Number: 12462 Olivier Hubaut 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