Thread: Problem starting postmaster at startup

Problem starting postmaster at startup

From
"Patrick Bye (WFF)"
Date:
My postgresql database has been starting up automatically at boot time for 4
weeks until this week.  No messages in the logfile why it doesn't start.  I
am running version 7.2.3 in SuSE Linux 7.0 (s390).  I did the build of
postgres on this system.

I had this difficulty when I first installed.  I tried using the startup
script from the contrib directory without any luck.  I put it in the
/etc/rc.d directory and created a symbolic link to it in the rc.2 directory
for starting.  The script works fine if I run it but wouldn't at startup.
So I created my own in the same directory.

#! /bin/sh
case $1 in
  start)
    su -c '/usr/local/pgsql/bin/pg_ctl start -l
/usr/local/pgsql/data/logfile -D /usr/local/pgsql/data' postgres
    ;;
  stop)
    su -c '/usr/local/pgsql/bin/pg_ctl stop -D /usr/local/pgsql/data'
postgres
    ;;
esac

exit 0

This has been working fine for 4 weeks.  Now, all I get at startup is the
message "postmaster successfully started" but I cannot find postmaster
running anywhere in the system.  I know pg_ctl is executing because of the
message but postmaster is not logging anything at all.

I know a little about *nix but not anything about the startup process.  Any
help would be appreciated.

Patrick Bye
Programmer / Analyst
Westfair Foods Ltd.
pbye@westfair.ca
(403) 291-6538


Re: Problem starting postmaster at startup

From
Oliver Elphick
Date:
On Wed, 2003-01-29 at 23:23, Patrick Bye (WFF) wrote:
...
>     su -c '/usr/local/pgsql/bin/pg_ctl start -l
> /usr/local/pgsql/data/logfile -D /usr/local/pgsql/data' postgres
...
> This has been working fine for 4 weeks.  Now, all I get at startup is the
> message "postmaster successfully started" but I cannot find postmaster
> running anywhere in the system.  I know pg_ctl is executing because of the
> message but postmaster is not logging anything at all.

Unfortunately, that message is meaningless.  The pg_ctl script runs the
postmaster in the background, and will not notice if it fails, as it
obviously has.

Try starting the postmaster directly and see what happens.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "My son, if sinners entice thee, consent thou not."
                            Proverbs 1:10


Re: Problem starting postmaster at startup

From
"scott.marlowe"
Date:
Try to see if you've postmaster.pid in the $PGDATA directory.

My guess is that the postmaster didn't make it all the way to shutdown
once, and the system kill -9'd it as the last step for shutting down, so
the .pid file is still there.

Just delete it and your database should start right up.

On Wed, 29 Jan 2003, Patrick Bye (WFF) wrote:

> My postgresql database has been starting up automatically at boot time for 4
> weeks until this week.  No messages in the logfile why it doesn't start.  I
> am running version 7.2.3 in SuSE Linux 7.0 (s390).  I did the build of
> postgres on this system.
>
> I had this difficulty when I first installed.  I tried using the startup
> script from the contrib directory without any luck.  I put it in the
> /etc/rc.d directory and created a symbolic link to it in the rc.2 directory
> for starting.  The script works fine if I run it but wouldn't at startup.
> So I created my own in the same directory.
>
> #! /bin/sh
> case $1 in
>   start)
>     su -c '/usr/local/pgsql/bin/pg_ctl start -l
> /usr/local/pgsql/data/logfile -D /usr/local/pgsql/data' postgres
>     ;;
>   stop)
>     su -c '/usr/local/pgsql/bin/pg_ctl stop -D /usr/local/pgsql/data'
> postgres
>     ;;
> esac
>
> exit 0
>
> This has been working fine for 4 weeks.  Now, all I get at startup is the
> message "postmaster successfully started" but I cannot find postmaster
> running anywhere in the system.  I know pg_ctl is executing because of the
> message but postmaster is not logging anything at all.
>
> I know a little about *nix but not anything about the startup process.  Any
> help would be appreciated.
>
> Patrick Bye
> Programmer / Analyst
> Westfair Foods Ltd.
> pbye@westfair.ca
> (403) 291-6538
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


Re: Problem starting postmaster at startup

From
"Patrick Bye (WFF)"
Date:
When I run the exact same command as root, it starts up fine.

Patrick Bye
Programmer / Analyst
Westfair Foods Ltd.
pbye@westfair.ca
(403) 291-6538


-----Original Message-----
From: Oliver Elphick [mailto:olly@lfix.co.uk]
Sent: Wednesday, January 29, 2003 4:56 PM
To: Patrick Bye (WFF)
Cc: 'pgsql-general@postgresql.org'
Subject: Re: [GENERAL] Problem starting postmaster at startup


On Wed, 2003-01-29 at 23:23, Patrick Bye (WFF) wrote:
...
>     su -c '/usr/local/pgsql/bin/pg_ctl start -l
> /usr/local/pgsql/data/logfile -D /usr/local/pgsql/data' postgres
...
> This has been working fine for 4 weeks.  Now, all I get at startup is the
> message "postmaster successfully started" but I cannot find postmaster
> running anywhere in the system.  I know pg_ctl is executing because of the
> message but postmaster is not logging anything at all.

Unfortunately, that message is meaningless.  The pg_ctl script runs the
postmaster in the background, and will not notice if it fails, as it
obviously has.

Try starting the postmaster directly and see what happens.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "My son, if sinners entice thee, consent thou not."
                            Proverbs 1:10

Re: Problem starting postmaster at startup

From
"Patrick Bye (WFF)"
Date:
I already tried that hoping that it was the problem but alas there was no
.pid file.  When I run the exact same command as root, it starts fine.

Patrick Bye
Programmer / Analyst
Westfair Foods Ltd.
pbye@westfair.ca
(403) 291-6538


-----Original Message-----
From: scott.marlowe [mailto:scott.marlowe@ihs.com]
Sent: Wednesday, January 29, 2003 5:02 PM
To: Patrick Bye (WFF)
Cc: 'pgsql-general@postgresql.org'
Subject: Re: [GENERAL] Problem starting postmaster at startup


Try to see if you've postmaster.pid in the $PGDATA directory.

My guess is that the postmaster didn't make it all the way to shutdown
once, and the system kill -9'd it as the last step for shutting down, so
the .pid file is still there.

Just delete it and your database should start right up.

On Wed, 29 Jan 2003, Patrick Bye (WFF) wrote:

> My postgresql database has been starting up automatically at boot time for
4
> weeks until this week.  No messages in the logfile why it doesn't start.
I
> am running version 7.2.3 in SuSE Linux 7.0 (s390).  I did the build of
> postgres on this system.
>
> I had this difficulty when I first installed.  I tried using the startup
> script from the contrib directory without any luck.  I put it in the
> /etc/rc.d directory and created a symbolic link to it in the rc.2
directory
> for starting.  The script works fine if I run it but wouldn't at startup.
> So I created my own in the same directory.
>
> #! /bin/sh
> case $1 in
>   start)
>     su -c '/usr/local/pgsql/bin/pg_ctl start -l
> /usr/local/pgsql/data/logfile -D /usr/local/pgsql/data' postgres
>     ;;
>   stop)
>     su -c '/usr/local/pgsql/bin/pg_ctl stop -D /usr/local/pgsql/data'
> postgres
>     ;;
> esac
>
> exit 0
>
> This has been working fine for 4 weeks.  Now, all I get at startup is the
> message "postmaster successfully started" but I cannot find postmaster
> running anywhere in the system.  I know pg_ctl is executing because of the
> message but postmaster is not logging anything at all.
>
> I know a little about *nix but not anything about the startup process.
Any
> help would be appreciated.
>
> Patrick Bye
> Programmer / Analyst
> Westfair Foods Ltd.
> pbye@westfair.ca
> (403) 291-6538
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>