From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | Al Bean <albean84(at)hotmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: the "/usr/local/pgsql/data" directory size |
Date: | 2002-12-05 23:32:37 |
Message-ID: | 3DEFE215.4090004@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Al Bean wrote:
> Now, after compiling postgres and running initdb I noticed a the data
> directory is a little over 23MB. I understand that much of this is
> allocated to system tables but is there anyway to (significantly) decrease
> the overall size here? For example the template1 db probably resides in
> here. would it be possible to create a user db and then delete the
> template1 db or even simply use the template1 db?
>
You should be able to drop the template1 database and create your user
database from template0, or just use template1 for your user database as you
suggested. I think lack of template1 may adversely affect some of the client
utilities, so test carefully.
Other things I can think of:
1. Reduce NAMEDATALEN in ~/src/include/postgres_ext.h: in 7.3 (just released
and highly recommended) NAMEDATALEN was increased based on popular demand to
64. It was 32 (31 usable characters for table and other object names). If you
can use 32 or even less it will reduce the template and user database size
some. Not sure how low you can safely take this.
2. Reduce INDEX_MAX_KEYS in src/include/pg_config.h.in: again increased from
16 to 32 in 7.3. If you can live with functions and indexes with no more than
16 arguments, this will also save you space. I *think* you can safely take
this down to 8, but hopefully someone else will comment on that.
Both of these items will make your database and client incompatible with the
rest of the world of Postgres users, but I'm guessing that is OK for an
embedded application.
HTH,
Joe
From | Date | Subject | |
---|---|---|---|
Next Message | scott.marlowe | 2002-12-05 23:53:22 | Re: the "/usr/local/pgsql/data" directory size |
Previous Message | Josh Berkus | 2002-12-05 23:12:45 | Re: Newbee question "Types" |