Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 27069 - postgresql doesnt work on amd64
Summary: postgresql doesnt work on amd64
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-21 11:45 UTC by Olivier Crete (RETIRED)
Modified: 2007-09-22 23:13 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
postgresql-7.3.4-r2.ebuild.patch (patch,853 bytes, patch)
2003-12-07 14:57 UTC, MATSUU Takuto (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.