Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 27069

Summary: postgresql doesnt work on amd64
Product: Gentoo Linux Reporter: Olivier Crete (RETIRED) <tester>
Component: Current packagesAssignee: PgSQL Bugs <pgsql-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: amd64, drobbins, esigra, matsuu
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: postgresql-7.3.4-r2.ebuild.patch

Description Olivier Crete (RETIRED) gentoo-dev 2003-08-21 11:45:21 UTC
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:
Comment 1 Olivier Crete (RETIRED) gentoo-dev 2003-08-21 11:46:34 UTC
oops.. wrong person tho..  Jeff Davey <jeffdavey@submersion.com> sent us the info.. not Paul ;)

 
Comment 2 Brad House 2003-10-03 14:13:33 UTC
hmm, works fine here, going to close it out. 
was filed a long time ago though, perhaps it was
not on 7.3.4 ...
Comment 3 MATSUU Takuto (RETIRED) gentoo-dev 2003-12-07 14:57:29 UTC
Created attachment 21835 [details, diff]
postgresql-7.3.4-r2.ebuild.patch

My Athlon64 also gets semaphore problem.
this patch fix it.
Comment 4 Paul Sumner 2004-11-10 12:03:47 UTC
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?).
Comment 5 MATSUU Takuto (RETIRED) gentoo-dev 2004-11-11 15:00:13 UTC
This problem was fixed in Bug 48752.