Обсуждение: Cannot (re)start PostgreSQL

Поиск
Список
Период
Сортировка

Cannot (re)start PostgreSQL

От
"otisg"
Дата:
Hello,

A few minutes ago I had to cold reboot my machine (Red Hat 7.2) that was running PostgreSQL 7.2, as it (the machine) was hung (which is another PostgreSQL story that I'll explain separately).

My attempt:
[root@linux2 root]# /etc/rc.d/init.d/postgresql restart
Stopping postgresql service: [FAILED]
Starting postgresql service: [FAILED]

The only thing I see in /var/log/messages:
May 5 23:19:26 localhost postgresql: Starting postgresql service: failed

I cannot figure out what is causing this problem.
These are logging-related lines from my ~postgres/data/postgresql.conf file:

log_connections = true
syslog = 2 # range 0-2


What else can I do to figure out what is going on?
Because of how I had to reboot the machine it is possible that something got corrupted, but I can't find a way to figure out whether that is the problem, and if it is, how to fix it (I just searched the 7.2.1 docs and this list's archives and couldn't find anything related to corruption and repair).

Is there a way to get a more verbose error message from PostgreSQL that will tell me why I can't start the DB?

Thank you,
Otis
_______________________________________________________________
Sign up for FREE iVillage newsletters.
From health and pregnancy to shopping and relationships, iVillage
has the scoop on what matters most to you.

Re: Cannot (re)start PostgreSQL

От
Tom Lane
Дата:
"otisg" <otisg@iVillage.com> writes:
> Is there a way to get a more verbose error message from PostgreSQL that
> will tell me why I can't start the DB?

I'd venture that your /etc/rc script is preventing Postgres from telling
you anything useful.  Try starting PG by hand ... or at the very least,
find out what the script is doing with the postmaster's error output.
There are way too many of those scripts that think routing stderr
to /dev/null is a good idea.

            regards, tom lane

Re: Cannot (re)start PostgreSQL

От
Lamar Owen
Дата:
On Monday 06 May 2002 12:04 am, Tom Lane wrote:
> "otisg" <otisg@iVillage.com> writes:
> > Is there a way to get a more verbose error message from PostgreSQL that
> > will tell me why I can't start the DB?

> I'd venture that your /etc/rc script is preventing Postgres from telling
> you anything useful.  Try starting PG by hand ... or at the very least,
> find out what the script is doing with the postmaster's error output.

For debugging purposes, either editing /etc/rc.d/init.d/postgresql to change
the output redirect, or enabling syslog as documented in
/usr/share/doc/postgresql-7.2 (or 7.2.1, as applicable).

> There are way too many of those scripts that think routing stderr
> to /dev/null is a good idea.

And until our stderr is rollable it will remain a good idea.  Sorry.  Syslog
is the best bet with our current non-rollable stderr.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

Re: Cannot (re)start PostgreSQL

От
"otisg"
Дата:
Thank you, this was it.

Otis
_______________________________________________________________
Sign up for FREE iVillage newsletters.
From health and pregnancy to shopping and relationships, iVillage
has the scoop on what matters most to you.


<-----Original Message----->
>
> From: tulasi
> Sent: 5/6/2002 12:02:45 AM
> To: otisg@iVillage.com
> Subject: Re: [ADMIN] Cannot (re)start PostgreSQL
>
>
> hi,
> Just remove the postmaster.pid file from your data and then try to restart postgresql server...
> hope this can work out for you.
> all the best
> Tulasi
> otisg wrote: Hello,
>
> A few minutes ago I had to cold reboot my machine (Red Hat 7.2) that was running PostgreSQL 7.2, as
> it (the machine) was hung (which is another PostgreSQL story that I'll explain separately).
>
> My attempt:
> [root@linux2 root]# /etc/rc.d/init.d/postgresql restart
> Stopping postgresql service: [FAILED]
> Starting postgresql service: [FAILED]
>
> The only thing I see in /var/log/messages:
> May 5 23:19:26 localhost postgresql: Starting postgresql service: failed
>
> I cannot figure out what is causing this problem.
> These are logging-related lines from my ~postgres/data/postgresql.conf file:
>
> log_connections = true
> syslog = 2 # range 0-2
>
>
> What else can I do to figure out what is going on?
> Because of how I had to reboot the machine it is possible that something got corrupted, but I can't
> find a way to figure out whether that is the problem, and if it is, how to fix it (I just searched
> the 7.2.1 docs and this list's archives and couldn't find anything related to corruption and repair).
>
> Is there a way to get a more verbose error message from PostgreSQL that will tell me why I can't
> start the DB?
>
> Thank you,
> Otis
> _______________________________________________________________
> Sign up for FREE iVillage newsletters.
> From health and pregnancy to shopping and relationships, iVillage
> has the scoop on what matters most to you. Just
>
> Do You Yahoo!?
> Yahoo! Health - your guide to health and wellness

Re: Cannot (re)start PostgreSQL

От
Lamar Owen
Дата:
On Monday 06 May 2002 12:03 am, Lamar Owen wrote:
> For debugging purposes, either editing /etc/rc.d/init.d/postgresql to
> change the output redirect, or enabling syslog as documented in
> /usr/share/doc/postgresql-7.2 (or 7.2.1, as applicable).

Urgh.  Append 'README.rpm-dist' to that path.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11