Subject: Re: PostgreSQL
To: Anthony Cooper <firstname.lastname@example.org>
From: Byron Servies <email@example.com>
Date: 05/05/2004 09:09:11
On May 5, 2004, at 8:49 AM, Anthony Cooper wrote:
> Now I've had a little free time I've finally got the 1.6.1 restore CD
> to install and boot OK. It was the HD, couldn't get it to boot so I
> swapped it out for an older 6 GB disc, which should be big enough for
> my needs.
> Anyway, I've got Apache2 and PHP up and running and would like to have
> a go at PostgreSQL. Is this good idea or am I pushing the hardware a
> little too far? (I've got 144Mb RAM). I've read that it requires a
> kernel rebuild to go about this. Does anyone have any tips? A install
> guide would be ideal ;-)
I've done this and have been very happy with the results. It's not
blindingly fast by any means, but it does function nicely and I have a
10gb database running pretty good; just don't do queries that have to
do a table scan of millions of rows!
Here is what I had to do:
1. Set shared memory settings in a custom kernel
options SEMMNI=2000 # number of semaphore identifiers
options SEMMNS=12000 # number of semaphores in system
options SEMUME=2000 # max number of undo entries per process
options SEMMNU=6000 # number of undo structures in system
#options SHMMAXPGS=4096 # 1024 pages is the default
is what I used.
2. Postgresql 7.3.4 build problem
I built from pkgsrc (databases/postgresql) and had a problem with the
'dynaloader.c' file. This file calls dlopen, but there are a set of
"if defined(__mips__)" blocks that take them out. I changed these to
"ifndef HAVE_DLOPEN" and re-built. After that, I can load languages,
such as plpgsql, and the regression tests almost entirely pass (don't
remember which ones fail at the moment).
The tests won't run without this change, by the way. They require the
plpgsql language and without dlopen, it won't load.
I've been lame about sending in a pr on this. I should do so now while
I'm thinking about it.