Re: the "/usr/local/pgsql/data" directory size
От | Joe Conway |
---|---|
Тема | Re: the "/usr/local/pgsql/data" directory size |
Дата | |
Msg-id | 3DEFE215.4090004@joeconway.com обсуждение исходный текст |
Ответ на | the "/usr/local/pgsql/data" directory size ("Al Bean" <albean84@hotmail.com>) |
Ответы |
Re: the "/usr/local/pgsql/data" directory size
|
Список | 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
В списке pgsql-general по дате отправления: