开发者

postgresql doesn't starts after editing the postgresql.conf

I tried to enlarge the value of the "shared_buffers" settings to be larger then a default 24Mb, and the server doesn't starts with other values (I tried some) except of the default one. Just an empty logfile is created. It's a clean installation of the postgresql on the linux server, so all 开发者_Go百科other settings are default. Does anybody know what could be the reason.


Does it complain about something? Check the logs.

If the only thing you changed was the shared_buffers, then you might have hit the limit of the OS, and in that case it will tell you in the log.

If that is the case, then have a look at http://www.postgresql.org/docs/8.3/interactive/kernel-resources.html#SYSVIPC how to set it to a correct value.

Update:

A lot of other parameters are depending on the shared_buffers, but not the opposite, so there is nothing else that you would have to change as well. However, only because the server have 32GB of RAM doesn't mean that the OS allow you to use it. You have to make sure that the output of sysctl -a | grep kernel.shmmax is higher than the value of what you have set the shared_buffers to.

Does it stop working no matter how little you change the value, or do it work if you just add, say 1MB?

Also, as John is saying, the support for named values were introduced in 8.2, so if you are using a version before that you have to specify it in blocks instead of memory.

Another thing. It might be quite picky about the semantics. So, make sure that you have written MB and not Mb or mb.

It is however strange that you only get an empty log file, try to start the process manually either by doing as John is suggesting, or the easier one pg_ctl start as the user postgres (as long as the silent mode is not enabled, it will still output things to your terminal)


You probably have hit the kernel.shmmax limit. Set it higher with

sysctl -w kernel.shmmax=xxxx

To make this persist between boots, add a kernel.shmmax entry to /etc/sysctl.conf.


What version of PostgreSQL is this? I've run into issues using the "Mb" syntax for older version of PostgreSQL (it did not work on 8.1, but it works on 8.3).

I've found that if I manually start the postmaster process, not using the init.d script, I will see error messages printed to the console. Typically you have to su into the postgres account on your machine, the launch the postmaster binary, which on Ubuntu is at /usr/lib/postgresql/8.4/bin/postmaster (change according to your PostgreSQL and distro). My money is that you will see an error related to what Jimmy is describing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜