A user (Paul Strange <pauls@sellingsource.com>) submitted this info on how to get postgresql to work on amd64... I did some work on getting this to work properly. First, depending on your use flags, you need to emerge perl, python, tcl/tk with the -fPIC flag. emerge postgresql Now, here's the tricky part (well, at least for me) I had to modify my /usr/src/linux/include/linux/sem.h and set the following to get the ebuild /var/portage/dev-db/postgresql/postgresql-7.3.4 config to work. Change to the following: #define SEMMNI 512 /* <= IPCMNI max # of semaphore identifiers */ #define SEMMSL 1000 /* <= 8 000 max num of semaphores per id */ #define SEMMNS (SEMMNI*SEMMSL) /* <= INT_MAX max # of semaphores in system */ #define SEMOPM 128 /* <= 1 000 max num of ops per semop call */ #define SEMVMX 32767 /* <= 32767 semaphore maximum value */ #define SEMAEM SEMVMX /* adjust on exit max value */ after that, the config should work, you'll also need to modify the /etc/conf.d/postgresql file, and modify the PGOPTS to -N 512 -B 1024. Reproducible: Always Steps to Reproduce:
oops.. wrong person tho.. Jeff Davey <jeffdavey@submersion.com> sent us the info.. not Paul ;)
hmm, works fine here, going to close it out. was filed a long time ago though, perhaps it was not on 7.3.4 ...
Created attachment 21835 [details, diff] postgresql-7.3.4-r2.ebuild.patch My Athlon64 also gets semaphore problem. this patch fix it.
I just ran into this same issue, I think, using dev-db/postgresql-7.4.5-r2. My fix was: cat /proc/sys/kernel/sem | sed 's/128/1024/' > /proc/sys/kernel/sem ...but looking at the old patch it looks like it does the same thing (regression?).
This problem was fixed in Bug 48752.