sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
Netto's Avatar

How to obtain the real problem that avoids postgresql service starting?


Question posted by: Netto (Guest) on November 12th, 2005 12:57 AM
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


3 Answers Posted
Netto's Avatar
Guest - n/a Posts
#2: Re: How to obtain the real problem that avoids postgresql service starting?

> "Netto" <rcnetto@yahoo.com> escreveu na mensagem
news:bqhtn2$2aar$1@news.hub.org...[color=blue]
> Hi all,...
> I'd like to know where can I get information about what is happening to
> postgresql so it can't be started...[/color]

I wasn't able to find a file as I would like, but I when I tried to start
postmaster straightly, I got a message with the real problem,... you can try
that if need... :)

Netto


Craig O'Shannessy's Avatar
Craig O'Shannessy November 12th, 2005 01:00 AM
Guest - n/a Posts
#3: Re: How to obtain the real problem that avoids postgresql service starting?

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@somebox /#] vi /etc/init.d/postgresql
[root@somebox /#] touch /var/log/postgres.log
[root@somebox /#] chown postgres /var/log/postgres.log
[root@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:
[color=blue]
> 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 Join Bytes!)
>[/color]


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

Martijn van Oosterhout's Avatar
Martijn van Oosterhout November 12th, 2005 01:00 AM
Guest - n/a Posts
#4: Re: How to obtain the real problem that avoids postgresql service starting?

However, if you then rotate the logs, you end up with space that won't be
reclaimed until the postmaster is restarted. I guess this is why people use
syslog.

On Fri, Dec 05, 2003 at 03:12:29PM +1100, Craig O'Shannessy wrote:[color=blue]
> 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@somebox /#] vi /etc/init.d/postgresql
> [root@somebox /#] touch /var/log/postgres.log
> [root@somebox /#] chown postgres /var/log/postgres.log
> [root@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:
> [color=green]
> > 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 Join Bytes!)
> > [/color]
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster[/color]

--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/[color=blue]
> "All that is needed for the forces of evil to triumph is for enough good
> men to do nothing." - Edmond Burke
> "The penalty good people pay for not being interested in politics is to be
> governed by people worse than themselves." - Plato[/color]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/0Ag3Y5Twig3Ge+YRAsi8AKCesZcgvyrOw8f5R34Chvl3vRF0jA CgkOd4
zIe3Rz4L4YmVgcECHzLTvoc=
=JiGp
-----END PGP SIGNATURE-----

 
Not the answer you were looking for? Post your question . . .
196,841 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 196,841 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors