Postgresql won't start

Hello,
I used to run Postgresql 9.1 in jail, to day I start it as usual like this:
Code:
[root@web ]# /usr/local/etc/rc.d/postgresql start
pg_ctl: could not start server
Examine the log output.
dmesg give me nothing, any clue?
 
Hi Sife. First, putting Postgresql in a jail, is not a good idea. I read once about it, but unfortunately I do not have sources of this text. Maybe someone with more knowledge and experience, will be able to answer this question. I've used this server a very long time ago and I do not remember a lot of things. Doh!

When it comes to your problem with starting the server. pg_ctl is a utility to start, stop a PostgreSQL server etc. In your case, a message about could not start server appeared. So, maybe You should try to start PostgreSQL by running pg_ctl utility? Have you ever tried pg_ctl tool, or you always run the server via /usr/local/etc/rc.d/ location?

If the answer is yes and you have not used this tool, I think, that you could try to run server with pg_ctl utility. It is very simple to use, but remember about pg_ctl --help, which contains a lot of interesting information. Let see;

$ pg_ctl start [i][color="Gray"]to start the server[/color][/i]
$ pg_ctl -w start [i][color="Gray"]start the server, waiting until the server is accepting connections[/color][/i]
$ pg_ctl stop [i][color="Gray"]to stop the server[/color][/i]

Some more info about pg_ctl, you can find here; PG_CTL(1). I think, that may be helpful to read Server Setup and Operation chapter, included in the official PostgreSQL documentation; Chapter 17.. Please note, that I have not used PostgreSQL a very long time and it seems, that I remember only a pg_ctl tool. It seems to me, that is the only way in which I can help you.

Best regards!
 
postgresql runs excellent in jail, but needs:
Code:
security.jail.sysvipc_allowed=1
in /etc/sysctl.conf
Multiple instances (even in different jails) must be run under different uid/gid for user pgsql.
A happy Postgresql user.
 
One additional thing you will need to do when starting the jail is explicitly allow SYSV IPC in that jail. I believe the FreeBSD jail scripts have the option to do this (I use my own scripts written and updated since before those existed).

Search for allow.sysvipc in jail(8) for more info.
 
Back
Top