X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5091FD1B474 for ; Tue, 25 Nov 2003 22:38:33 +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 50098-01 for ; Tue, 25 Nov 2003 18:38:03 -0400 (AST) Received: from arbor.net (division.aa.arbor.net [204.181.64.2]) by svr1.postgresql.org (Postfix) with ESMTP id 46BCFD1B48D for ; Tue, 25 Nov 2003 18:38:02 -0400 (AST) Received: by arbor.net (Postfix, from userid 1065) id 414732A891; Tue, 25 Nov 2003 17:37:48 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by arbor.net (Postfix) with ESMTP id 398972A88C; Tue, 25 Nov 2003 17:37:48 -0500 (EST) Date: Tue, 25 Nov 2003 17:37:48 -0500 (EST) From: Chester Kustarz To: Grzegorz Dostatni Cc: pgsql-admin@postgresql.org Subject: Re: Size on Disk In-Reply-To: <20031125222145.19925.qmail@web10808.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Transfer-Encoding: QUOTED-PRINTABLE X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/437 X-Sequence-Number: 11424 you do not mention which version of postgresql or which files are problemat= ic, but just guessing: - log/checkpoint files: http://www.varlena.com/GeneralBits/Tidbits/perf.html - index files: see "reindex" command - table files: see FSM settings and vacuum more, or vacuum full (contrib/pg_autovacuum is helpful here) SELECT CASE WHEN ((SELECT class3.relname FROM pg_class class3, pg_index WHE= RE ((class1.oid =3D pg_index.indexrelid) AND (class3.oid =3D pg_index.indre= lid))) IS NOT NULL) THEN (SELECT class3.relname FROM pg_class class3, pg_in= dex WHERE ((class1.oid =3D pg_index.indexrelid) AND (class3.oid =3D pg_inde= x.indrelid))) WHEN (class1.relname IS NOT NULL) THEN class1.relname ELSE NU= LL::name END AS "table", CASE WHEN (class1.relkind =3D 'r'::"char") THEN NU= LL::name ELSE class1.relname END AS "index", (class1.relpages * 8) AS "size= (KBytes)" FROM pg_class class1 WHERE ((class1.relkind =3D 'r'::"char") OR = (class1.relkind =3D 'i'::"char")) ORDER BY CASE WHEN ((SELECT class3.relnam= e FROM pg_class class3, pg_index WHERE ((class1.oid =3D pg_index.indexrelid= ) AND (class3.oid =3D pg_index.indrelid))) IS NOT NULL) THEN (SELECT class3= .relname FROM pg_class class3, pg_index WHERE ((class1.oid =3D pg_index.ind= exrelid) AND (class3.oid =3D pg_index.indrelid))) WHEN (class1.relname IS N= OT NULL) THEN class1.relname ELSE NULL::name END, CASE WHEN (class1.relkind= =3D 'r'::"char") THEN NULL::name ELSE class1.relname END, (class1.relpages= * 8); might help telling you how big things are. i have problems sometimes where the sizes for indexes are not correct. you can also run "vacuum verbose ful= l" and see if it is maybe dead tuples sticking around. On Tue, 25 Nov 2003, Grzegorz Dostatni wrote: > I am working on a Knoppix distribution of my program. > I do have it working, but the size of the database on > disk is becoming a factor. (I copy it to ramdisk > before starting postmaster). > > How can I change (minimize) the size of the db on > disk? Are there any parameters I can set? Maybe limit > the size of logs/journals?