Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 96A4B64FD1A for ; Mon, 10 Nov 2008 11:24:27 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 03964-05 for ; Mon, 10 Nov 2008 11:24:27 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 0899764FC77 for ; Mon, 10 Nov 2008 11:24:26 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id mAAFOOcq006568; Mon, 10 Nov 2008 10:24:24 -0500 (EST) To: "=?ISO-8859-1?Q?Dilek_K=FC=E7=FCk?=" cc: pgsql-admin@postgresql.org Subject: Re: max_files_per_process limit In-reply-to: <5d5d98b30811100618v2c0f935fka3f7970b622d6760@mail.gmail.com> References: <5d5d98b30811100618v2c0f935fka3f7970b622d6760@mail.gmail.com> Comments: In-reply-to "=?ISO-8859-1?Q?Dilek_K=FC=E7=FCk?=" message dated "Mon, 10 Nov 2008 16:18:37 +0200" Date: Mon, 10 Nov 2008 10:24:24 -0500 Message-ID: <6567.1226330664@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200811/48 X-Sequence-Number: 30702 "=?ISO-8859-1?Q?Dilek_K=FC=E7=FCk?=" writes: > We have a database of about 62000 tables (about 2000 tablespaces) with an > index on each table. Postgresql version is 8.1. You should probably rethink that schema. A lot of similar tables can be folded into one table with an extra key column. Also, where did you get the idea that 2000 tablespaces would be a good thing? There's really no point in more than one per spindle or filesystem. > Although after the initial inserts to about 32000 tables the subsequent > inserts are considerable fast, subsequent inserts to more than 32000 tables > are very slow. This has probably got more to do with inefficiencies of your filesystem than anything else --- did you pick one that scales well to lots of files per directory? > This seems to be due to the datatype (integer) of max_files_per_process > option in the postgres.conf file which is used to set the maximum number of > open file descriptors. It's not so much the datatype of max_files_per_process as the datatype of kernel file descriptors that's the limitation ... regards, tom lane