Unix Technical Forum

hot restart of posgtresql

This is a discussion on hot restart of posgtresql within the pgsql Admins forums, part of the PostgreSQL category; --> hi all by unknown reason our database server rebooted couple hours ago. now i cannot restart posgresql 8.1 heres ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 07:43 AM
ngaleyev@wavelengthmail.com
 
Posts: n/a
Default hot restart of posgtresql

hi all
by unknown reason our database server rebooted couple hours ago.
now i cannot restart posgresql 8.1
heres the error code i get:


================================================== ===
root@eddie:/var/run# /etc/init.d/postgresql-8.1 start
Starting PostgreSQL 8.1 database server: mainThe PostgreSQL server failed
to start. Please check the log output:
2007-07-03 19:20:42 EDT 2928 FATAL: could not create shared memory
segment: Invalid argument
2007-07-03 19:20:42 EDT 2928 DETAIL: Failed system call was
shmget(key=5432001, size=3276259328, 03600).
2007-07-03 19:20:42 EDT 2928 HINT: This error usually means that
PostgreSQL's request for a shared memory segment exceeded your kernel's
SHMMAX parameter. You can either reduce the request size or reconfigure
the kernel with larger SHMMAX. To reduce the request size (currently
3276259328 bytes), reduce PostgreSQL's shared_buffers parameter (currently
393216) and/or its max_connections parameter (currently 250).
If the request size is already small, it's possible that it is
less than your kernel's SHMMIN parameter, in which case raising
the request size or reconfiguring SHMMIN is called for.
The PostgreSQL documentation contains more information about
shared memory configuration.
failed!
================================================== =====

heres my sysctl:
kernel.shmmax=4294967296
kernel.shmall=536870912


Any help will be really appreciated
Thanks



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 07:43 AM
Tom Lane
 
Posts: n/a
Default Re: hot restart of posgtresql

ngaleyev@wavelengthmail.com writes:
> 2007-07-03 19:20:42 EDT 2928 FATAL: could not create shared memory
> segment: Invalid argument
> 2007-07-03 19:20:42 EDT 2928 DETAIL: Failed system call was
> shmget(key=5432001, size=3276259328, 03600).
> 2007-07-03 19:20:42 EDT 2928 HINT: This error usually means that
> PostgreSQL's request for a shared memory segment exceeded your kernel's
> SHMMAX parameter. You can either reduce the request size or reconfigure
> the kernel with larger SHMMAX. To reduce the request size (currently
> 3276259328 bytes), reduce PostgreSQL's shared_buffers parameter (currently
> 393216) and/or its max_connections parameter (currently 250).


> heres my sysctl:
> kernel.shmmax=4294967296
> kernel.shmall=536870912


Why have you got SHMALL set to half a GB when you have Postgres
configured to ask for over 3 GB?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 07:43 AM
Alvaro Herrera
 
Posts: n/a
Default Re: hot restart of posgtresql

Tom Lane wrote:
> ngaleyev@wavelengthmail.com writes:
> > 2007-07-03 19:20:42 EDT 2928 FATAL: could not create shared memory
> > segment: Invalid argument
> > 2007-07-03 19:20:42 EDT 2928 DETAIL: Failed system call was
> > shmget(key=5432001, size=3276259328, 03600).
> > 2007-07-03 19:20:42 EDT 2928 HINT: This error usually means that
> > PostgreSQL's request for a shared memory segment exceeded your kernel's
> > SHMMAX parameter. You can either reduce the request size or reconfigure
> > the kernel with larger SHMMAX. To reduce the request size (currently
> > 3276259328 bytes), reduce PostgreSQL's shared_buffers parameter (currently
> > 393216) and/or its max_connections parameter (currently 250).

>
> > heres my sysctl:
> > kernel.shmmax=4294967296
> > kernel.shmall=536870912

>
> Why have you got SHMALL set to half a GB when you have Postgres
> configured to ask for over 3 GB?


Hmm, isn't shmall measured in pages?

I think the problem may be that he changed the settings in sysctl.conf
but he hasn't rebooted since, so the kernel is running with other
settings. Trying with sysctl -w to change the actual values might prove
helpful.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 07:43 AM
Tom Lane
 
Posts: n/a
Default Re: hot restart of posgtresql

Alvaro Herrera <alvherre@commandprompt.com> writes:
> Tom Lane wrote:
>> ngaleyev@wavelengthmail.com writes:
>>> heres my sysctl:
>>> kernel.shmmax=4294967296
>>> kernel.shmall=536870912

>>
>> Why have you got SHMALL set to half a GB when you have Postgres
>> configured to ask for over 3 GB?


> Hmm, isn't shmall measured in pages?


Depends on platform, which he didn't say ... but if it is a platform
that measures in pages, I wonder whether that value is provoking an
integer overflow somewhere. I don't think Linux allows more than
about 2 million, for instance.

> I think the problem may be that he changed the settings in sysctl.conf
> but he hasn't rebooted since, so the kernel is running with other
> settings. Trying with sysctl -w to change the actual values might prove
> helpful.


But his DB *was* running before, so somehow the active sysctl settings
are different now than they were. I was betting on there having been
a manual tweak to sysctl that never got made in the configuration file,
and thus got lost on reboot.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:43 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com