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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| 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 |
| |||
| 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 |
| ||||
| 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 |