Fw: Postgresql 7 does not always start on RH 6.2
Thanks Tom
In the messages log I found
-PAM-pwdb[464]: (su) session opened for user postgres by (uid=0)
-PAS_pwdb[464]: (su) session closed for user postres
Also in /var/log there are files called postgresql but unzipped they all
have size zero.
The line in /etc/rc.d/init.d/postgresql that I think is starting postgresql
is
su -l postgres -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster start
/dev/null 2>&1"
from this I assume that it is not being started with -S (silent). Looking at
the man pages for postmaster it seems to imply that the logfile would be
/dev/null. I am afraid this is a little beyond my knowledge of linux.
Editing the file and changing /dev/null to say /var/log/something produces
an access denied.
How do I find this log file or alter the script to produce a log file?
Regards
Warren
-----Original Message-----
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Warren Flemmer <warren@netlab.co.za>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Date: Saturday, October 14, 2000 6:35 PM
Subject: Re: [GENERAL] Postgresql 7 does not always start on RH 6.2
"Warren Flemmer" <warren@netlab.co.za> writes:
But, I have one problem. On RedHat 6.2 I can not get postgresql 7 to
always
start. When booting I always get "Looks Good!" but I do not always get
the
Show quoted text
PID (if not I get failed).
Hm. The postmaster should report some kind of complaint if it doesn't
start. Make sure that the postmaster isn't being started with a -S
switch, and that its stdout and stderr are redirected into a logfile
someplace. Then look in the logfile after a startup failure, and let
us know what you find.regards, tom lane
Warren,
su -l postgres -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster
start/dev/null 2>&1"
Something like this:
su -l postgres -c "/usr/bin/og_ctl -D $PGDATA -p /usr/bin/postmaster start
/var/log/pgsql 2>&1"
Then check that /var/log/pgsql exists and is writeable by postgres user.
Eg, include pgsql in a group called log, then
# chown root.log /var/log
# chmod 0750 /var/log
# cd /var/log
# echo -n > ./pgsql
# chown postgres.root ./pgsql
# chmod 0600 ./pgsql
Also, make sure that /var and / are 5 for user postgres.
Another reason for postmaster to fail is a stale UNIX domain socket,
usually /tmp/.s.PGSQL.5432 It remains in /tmp if for some reason postmaster
hasn't been stopped correctly.
HTH
Ed
---
Well I tried to be meek
And I have tried to be mild
But I spat like a woman
And I sulked like a child
I have lived behind the walls
That have made me alone
Striven for peace
Which I never have known
Dire Straits, Brothers In Arms, The Man's Too Strong (Knopfler)