Re: Size on Disk - Mailing list pgsql-admin

From Chester Kustarz
Subject Re: Size on Disk
Date
Msg-id Pine.BSO.4.44.0311251731150.19584-100000@detroit.arbor.net
Whole thread Raw
In response to Size on Disk  (Grzegorz Dostatni <dostatnig@yahoo.com>)
Responses Re: Size on Disk  (Grzegorz Dostatni <dostatnig@yahoo.com>)
Re: Size on Disk  (Oli Sennhauser <oli.sennhauser@bluewin.ch>)
List pgsql-admin
you do not mention which version of postgresql or which files are problematic,
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 WHERE ((class1.oid = pg_index.indexrelid) AND
(class3.oid= pg_index.indrelid))) IS NOT NULL) THEN (SELECT class3.relname FROM pg_class class3, pg_index WHERE
((class1.oid= pg_index.indexrelid) AND (class3.oid = pg_index.indrelid))) WHEN (class1.relname IS NOT NULL) THEN
class1.relnameELSE NULL::name END AS "table", CASE WHEN (class1.relkind = 'r'::"char") THEN NULL::name ELSE
class1.relnameEND AS "index", (class1.relpages * 8) AS "size (KBytes)" FROM pg_class class1 WHERE ((class1.relkind =
'r'::"char")OR (class1.relkind = 'i'::"char")) ORDER BY CASE WHEN ((SELECT class3.relname FROM pg_class class3,
pg_indexWHERE ((class1.oid = pg_index.indexrelid) AND (class3.oid = pg_index.indrelid))) IS NOT NULL) THEN (SELECT
class3.relnameFROM pg_class class3, pg_index WHERE ((class1.oid = pg_index.indexrelid) AND (class3.oid =
pg_index.indrelid)))WHEN (class1.relname IS NOT NULL) THEN class1.relname ELSE NULL::name END, CASE WHEN
(class1.relkind= '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 full"
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?


pgsql-admin by date:

Previous
From: Grzegorz Dostatni
Date:
Subject: Size on Disk
Next
From: Grzegorz Dostatni
Date:
Subject: Re: Size on Disk