72L;144L;216L;288L;360L;0L;Here's a patch to get postgresql up and running (I've only tested it on PB w/ dev tools but it should work on Darwin as well). It's very rough but I thought I'd put it up for those of you who are interested. If anyone has suggestions or help for some of the remaining issues listed below, please email me. Thanks.

http://www.gerga.com/pg_darwin_patch.tar.gz

to install:

wget ftp://ftp.postgresql.org/pub/v7.0.2/postgresql-7.0.2.tar.gz
wget http://www.gerga.com/pg_darwin_patch.tar.gz
tar xzvf postgresql-7.0.2.tar.gz
tar xzvf pg_darwin_patch.tar.gz
cd postgresql-7.0.2
patch -p1 < ../pg_darwin_patch

(WARNING! You need to put a symlink in your /usr/include/sys dir to sem.h. OSXPB doesn't have the sysv semaphore implementation included but it seems to be in the newer kernels -- so check before you clobber something you might already have. I'm currently just using the qnx semaphore port but this should probably be removed when Apple's semaphore implementation arrives.)

ln -s `pwd`/src/backend/port/darwin/sem.h /usr/include/sys/sem.h

cd src
./configure --without-CXX -with-perl
(c++ lib needs to be hacked; perl seems to work; I haven't really tried other options yet.)
make
make install

these default paths help:

export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}:/usr/local/pgsql/lib"
export PGDATA="/usr/local/pgsql/data"
export PGLIB="/usr/local/pgsql/lib"

read postgresql-7.0.2/INSTALL for setting up the postmaster and getting things going.
(initdb /usr/local/pgsql/data; postmaster)

for the regression tests:
cd postgres-7.0.2/src/tests/regress
make
make runtest
(int2 & int4 will "fail" because of different error messages)
(geometry "fails" because 0 != -0 for some reason)


some issues/problems:

- if you try to load a badly made dynamic library, you will get an error like:
dyld: /usr/local/pgsql/bin/./postmaster Undefined symbols:
dyld_stub_binding_helper
Server process (pid 8932) exited with status 17152 at Sun Oct 22 00:41:22 2000
Terminating any active server processes...
Server processes were terminated at Sun Oct 22 00:41:22 2000
Reinitializing shared memory and semaphores

Need to fix/make the error routine in src/backend/port/dynloader/darwin.c?

-running the regression tests more than once seems to corrupt the database. it can't be dropped or created the second time. I I haven't found a way to get rid of it beside re-initdb-ing the data directory which isn't a very useful solution at all. ideas/suggestions?

- there may be semaphore/shared memory leaking going on. the routines are a bit of a cludge and the postgres ipcclean utility needs ipcs. is there an osx equivalent?

- when compiled with any -O, the following regression tests fail:
oidjoins .. failed
type_sanity .. failed
opr_sanity .. failed
28L;56L;84L;112L;140L;168L;196L;224L;252L;280L;308L;336L;

Reply via email to