Re: How to obtain the real problem that avoids postgresql

From: "Craig O'Shannessy" <craig(at)ucw(dot)com(dot)au>
To: Netto <rcnetto(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to obtain the real problem that avoids postgresql
Date: 2003-12-05 04:12:29
Message-ID: Pine.LNX.4.44.0312051507590.8177-100000@mail.undercoverwear.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think this is a pretty serious shortcoming of the standard
/etc/init.d/postgresql script, it sends all output (std. out AND error to
/dev/null).

You should have a line something like this

su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster -o '-p ${PGPORT}' start > /var/log/postgres.log 2>&1" < /dev/null

You can see where I have replaced the "> /dev/null" with "> /var/log/postgres.log"

You would want to do this first, before attempting to start postgres, so

[root(at)somebox /#] vi /etc/init.d/postgresql
[root(at)somebox /#] touch /var/log/postgres.log
[root(at)somebox /#] chown postgres /var/log/postgres.log
[root(at)somebox /#] /etc/init.d/postgresql start

Now, when it fails, you will get decent logging in /var/log/postgres.log

Hope this helps.

Craig

On Tue, 2 Dec 2003, Netto wrote:

> Hi all,...
> I'd like to know where can I get information about what is happening to
> postgresql so it can't be started...
>
> all I get is:
> Starting postgresql service: [FAILED]
>
> Is there any log file, or a way to start the database with a kind of -v
> (verbose) option??
> Or maybe any configuration parameter to modify on postgresql files,...
>
> Any suggestion will help a lot!
>
> That's it...
> Thanks!
> Netto
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2003-12-05 04:23:19 Re: How to obtain the real problem that avoids postgresql
Previous Message Alex Satrapa 2003-12-05 02:45:23 Re: are cursors necessary?