Обсуждение: compact PostgreSQL

Поиск
Список
Период
Сортировка

compact PostgreSQL

От
Yui Hiroaki
Дата:
Hi!
I would like to install PostgreSQL. But my pc does not have much space.
So I would like to make compact PostgreSQL. Does anyone know how to make
compact PostgreSQL? For example, to make comment out source code and
compile.


Regards,
Yui



Re: compact PostgreSQL

От
Shahbaz Javeed
Дата:
Yui,

Perhaps what you need is not a compacted source (which still needs
additional space to compile) but instead a binary distribution. 
Depending on the OS you're using, you might be able to find
pre-compiled binaries which would take much less space.

HTH
S


On Sat, 09 Oct 2004 22:03:48 +0900, Yui Hiroaki
<yui@mariana.u-aizu.ac.jp> wrote:
> Hi!
> I would like to install PostgreSQL. But my pc does not have much space.
> So I would like to make compact PostgreSQL. Does anyone know how to make
> compact PostgreSQL? For example, to make comment out source code and
> compile.
> 
> Regards,
> Yui
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
> 


-- 
Shahbaz Javeed


Re: compact PostgreSQL

От
Christopher Browne
Дата:
In the last exciting episode, yui@mariana.u-aizu.ac.jp (Yui Hiroaki) wrote:
> I would like to install PostgreSQL. But my pc does not have much
> space.  So I would like to make compact PostgreSQL. Does anyone know
> how to make compact PostgreSQL? For example, to make comment out
> source code and compile.

Commenting things out isn't likely to help terribly much.  In order to
be able to compile PostgreSQL in the first place, you'll need enough
disk space for:
a) All of the source code;b) All of the object code (in .o form);c) All of the compiled binaries.

Supposing you find a way to make the compiled binaries somewhat
smaller, you will still have to store all the source code and all of
the "raw" object code, which will be considerably larger than the
compiled binaries.

The only way to "save space" is to get someone else to compile
PostgreSQL, and install a precompiled version, in which manner you'll
avoid having a) and b) around.

Supposing you can assure yourself that you will not be using certain
components that are stored in their own libraries or binary programs,
you may be able to delete them from the compiled binaries.  

For instance, if you are certain you will never need to use stored
functions in PL/pgsql, you might delete the library for that.
Likewise, libraries for PL/Perl and PL/Python may get installed and be
unnecessary for you.

If you are certain that you will only use certain locales, then there
are some libraries you might be able to drop from the following set:

knuth:~# wc -c `dpkg -L postgresql | grep utf8`  5280 /usr/lib/postgresql/lib/utf8_and_ascii.so225720
/usr/lib/postgresql/lib/utf8_and_big5.so12808 /usr/lib/postgresql/lib/utf8_and_cyrillic.so125536
/usr/lib/postgresql/lib/utf8_and_euc_cn.so217392/usr/lib/postgresql/lib/utf8_and_euc_jp.so137976
/usr/lib/postgresql/lib/utf8_and_euc_kr.so336688/usr/lib/postgresql/lib/utf8_and_euc_tw.so
 
1020152 /usr/lib/postgresql/lib/utf8_and_gb18030.so355064 /usr/lib/postgresql/lib/utf8_and_gbk.so 32528
/usr/lib/postgresql/lib/utf8_and_iso8859.so 6448 /usr/lib/postgresql/lib/utf8_and_iso8859_1.so279144
/usr/lib/postgresql/lib/utf8_and_johab.so127880/usr/lib/postgresql/lib/utf8_and_sjis.so  8376
/usr/lib/postgresql/lib/utf8_and_tcvn.so279160/usr/lib/postgresql/lib/utf8_and_uhc.so  8408
/usr/lib/postgresql/lib/utf8_and_win1250.so 8440 /usr/lib/postgresql/lib/utf8_and_win1256.so  8216
/usr/lib/postgresql/lib/utf8_and_win874.so
3195216 total

Similarly, there are likely irrelevant locale-specific message files
that may be dropped.  Look for LC_MESSAGES; there's about 2.4MB of
language-specific messages on my system, and most of them I am
unlikely ever to use since they are messages for languages I do not
know (e.g. - Spanish, Italian, Portuguese, Russian, Asian languages).
-- 
wm(X,Y):-write(X),write('@'),write(Y). wm('cbbrowne','ntlug.org').
http://linuxfinances.info/info/spreadsheets.html
Faith  is the  quality that  enables you  to eat  blackberry jam  on a
picnic without looking to see whether the seeds move. -- DeMara Cabrera