Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 255004 - dev-db/postgresql - init.d script should use better errormessage on startup when SHMMMAX is to low
Summary: dev-db/postgresql - init.d script should use better errormessage on startup w...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-15 06:56 UTC by Ann Ohnym
Modified: 2010-06-04 14:19 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ann Ohnym 2009-01-15 06:56:29 UTC
I get this error on starting postgresql

/etc/init.d/postgresql-8.3 restart
 * Service postgresql-8.3 starting
 * Starting PostgreSQL ...
waiting for server to
start...............................................................could
not start server                                [ !! ]
 * The pid-file doesn't exist but pg_ctl reported a running server.
 * Please check whether there is another server running on the same
port or read the log-file.
    [ !! ]
 * ERROR:  postgresql-8.3 failed to start

The problem is that SHMMAX is set to low.

Better error message is needed!

Reproducible: Always

Steps to Reproduce:
1.increase shared buffers in postgresql
2.restart postgresql
3.




Warn that shmmax is set to low.
Comment 1 Leho Kraav (:macmaN @lkraav) 2009-12-05 12:00:42 UTC
amazing, i would never have thought of this. i had a larger shmmax set from an ancient Oracle XE install which i deleted when cleaning up for openrc. next startup postgresql-8.3 wouldn't start, as OP describes.

http://www.akadia.com/services/ora_linux_install_10g.html

sysctl -w kernel.shmmax=2147483648

did the trick. not entirely sure how this could be reported from the ebuild aside from a plain text notice "this could be your problem".
Comment 2 Leho Kraav (:macmaN @lkraav) 2009-12-05 12:01:08 UTC
my default shmmax was:

kernel.shmmax = 33554432
Comment 3 Aaron W. Swenson gentoo-dev 2010-03-24 00:07:08 UTC
Addressed in bug #311047
Comment 4 Patrick Lauer gentoo-dev 2010-06-04 14:19:53 UTC
Committed.