Re: Size on Disk

From: Chester Kustarz <chester(at)arbor(dot)net>
To: Grzegorz Dostatni <dostatnig(at)yahoo(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Size on Disk
Date: 2003-11-25 22:37:48
Message-ID: Pine.BSO.4.44.0311251731150.19584-100000@detroit.arbor.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-docs pgsql-hackers

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.relname ELSE NULL::name END AS "table", CASE WHEN (class1.relkind = 'r'::"char") THEN NULL::name ELSE class1.relname END 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_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.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?

In response to

  • Size on Disk at 2003-11-25 22:21:45 from Grzegorz Dostatni

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Iain 2003-11-26 01:19:50 Re: A quick question about domains
Previous Message Grzegorz Dostatni 2003-11-25 22:21:45 Size on Disk

Browse pgsql-docs by date

  From Date Subject
Next Message Grzegorz Dostatni 2003-11-26 04:37:52 Re: Size on Disk
Previous Message Grzegorz Dostatni 2003-11-25 22:21:45 Size on Disk

Browse pgsql-hackers by date

  From Date Subject
Next Message ohp 2003-11-25 22:49:57 7.4final regression failure on uw713
Previous Message Grzegorz Dostatni 2003-11-25 22:21:45 Size on Disk