Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-docspgsql-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

pgsql-docs by date

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

pgsql-hackers by date

Next:From: ohpDate: 2003-11-25 22:49:57
Subject: 7.4final regression failure on uw713
Previous:From: Grzegorz DostatniDate: 2003-11-25 22:21:45
Subject: Size on Disk

pgsql-admin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group