pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
postgres at reboot
6+ messages / 3 participants
[nested] [flat]

* postgres at reboot
@ 2008-09-25 19:08  Calvin Hom <chom@gallo.ucsf.edu>
  0 siblings, 0 replies; 6+ messages in thread

From: Calvin Hom @ 2008-09-25 19:08 UTC (permalink / raw)
  To: pgsql-admin

Hi Everybody,

 

About 1.5 month ago, my machine (which runs redhat linux

2.6.9-78.0.1.ELsmp on Dell hardware with postgres 8.3.3)

had a terrible crash.  I am mostly recovered, but there

is at least one more thing that's not right.

 

Namely, when the machine gets rebooted, postgres doesn't

start automatically.  Before the crash, there was no such

problem.

 

I see a file /etc/rc.d/init.d/postgresql.  Is this the

start-up script?  If not, please tell me what would be the

correct one (and where would I find one).  If it is, can you

please tell me where I would find the latest one anyway?

(Maybe the latest one got lost and I am looking at an old

copy???)

 

The detail of how it happens escapes me, but as near as I

can reconstruct in my head, after the reboot I discover that

postgres is not running and I issue:

  pg_ctl start

and it complains something to the effect that it is already

started (which seems to be not true) and maybe it gives me

a pid for the postmaster.  I think I tried:

  pg_ctl stop

and it told me something a bit disageeable.  But I found a

file with that pid in /tmp directory and when I remove that

file, then "pg_ctl start" succeeds.

 

If this sounds familiar to you (or you have some clue as to

what is going on), I would appreciate a tip.

 

Regards,

 

Tena Sakai

tsakai@gallo.ucsf.edu

 

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* postgres at reboot
@ 2008-09-25 19:42  Tena Sakai <tsakai@gallo.ucsf.edu>
  0 siblings, 1 reply; 6+ messages in thread

From: Tena Sakai @ 2008-09-25 19:42 UTC (permalink / raw)
  To: pgsql-admin

Hi Everybody,

About 1.5 month ago, my machine (which runs redhat linux
2.6.9-78.0.1.ELsmp on Dell hardware with postgres 8.3.3)
had a terrible crash.  I am mostly recovered, but there
is at least one more thing that's not right.

Namely, when the machine gets rebooted, postgres doesn't
start automatically.  Before the crash, there was no such
problem.

I see a file /etc/rc.d/init.d/postgresql.  Is this the
start-up script?  If not, please tell me what would be the
correct one (and where would I find one).  If it is, can you
please tell me where I would find the latest one anyway?
(Maybe the latest one got lost and I am looking at an old
copy???)

The detail of how it happens escapes me, but as near as I
can reconstruct in my head, after the reboot I discover that
postgres is not running and I issue:
  pg_ctl start
and it complains something to the effect that it is already
started (which seems to be not true) and maybe it gives me
a pid for the postmaster.  I think I tried:
  pg_ctl stop
and it told me something a bit disageeable.  But I found a
file with that pid in /tmp directory and when I remove that
file, then "pg_ctl start" succeeds.

If this sounds familiar to you (or you have some clue as to
what is going on), I would appreciate a tip.

Regards,

Tena Sakai
tsakai@gallo.ucsf.edu



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: postgres at reboot
@ 2008-09-25 19:46  Scott Marlowe <scott.marlowe@gmail.com>
  parent: Tena Sakai <tsakai@gallo.ucsf.edu>
  0 siblings, 1 reply; 6+ messages in thread

From: Scott Marlowe @ 2008-09-25 19:46 UTC (permalink / raw)
  To: Tena Sakai <tsakai@gallo.ucsf.edu>; +Cc: pgsql-admin

On Thu, Sep 25, 2008 at 1:42 PM, Tena Sakai <tsakai@gallo.ucsf.edu> wrote:
> Hi Everybody,
>
> About 1.5 month ago, my machine (which runs redhat linux
> 2.6.9-78.0.1.ELsmp on Dell hardware with postgres 8.3.3)
> had a terrible crash.  I am mostly recovered, but there
> is at least one more thing that's not right.
>
> Namely, when the machine gets rebooted, postgres doesn't
> start automatically.  Before the crash, there was no such
> problem.

In RH, you use chkconfig to see what's set to start:

chkconfig --list

will show you all the services and what run levels they come up in.

chkconfig servicename on|off -- will turn a service on or off at boot.

service servicename start -- will start a service.



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: postgres at reboot
@ 2008-09-26 20:38  Tena Sakai <tsakai@gallo.ucsf.edu>
  parent: Scott Marlowe <scott.marlowe@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Tena Sakai @ 2008-09-26 20:38 UTC (permalink / raw)
  To: Scott Marlowe <scott.marlowe@gmail.com>; +Cc: pgsql-admin

Hi Scott,

When I issue: /sbin/chkconfig --list | grep postgres
it comes back with:

 postgresql_ORG  0:off   1:off   2:off   3:off   4:off   5:off   6:off
 postgresql      0:off   1:off   2:on    3:on    4:on    5:on    6:off

I felt a bit strange that it says 'off' at run level 6.
I went into /etc/rc.d and issued:
 sudo find . -name \*postgresql\* -ls | grep S98postgresql
and it came back with:

 15618186    0 lrwxrwxrwx   1 root     root           20 Aug 21 17:00 ./rc4.d/S98postgresql -> ../init.d/postgresql
 15618294    0 lrwxrwxrwx   1 root     root           20 Aug 21 17:00 ./rc3.d/S98postgresql -> ../init.d/postgresql
 15618351    0 lrwxrwxrwx   1 root     root           20 Aug 21 17:00 ./rc2.d/S98postgresql -> ../init.d/postgresql
 15618024    0 lrwxrwxrwx   1 root     root           20 Aug 21 17:00 ./rc5.d/S98postgresql -> ../init.d/postgresql

Next, I went into /etc/rc.d/rc6.d and typed: 
 ls -l
and it gave me this:
     .       .  .    .      .  .   .   .         .              .        .
     .       .  .    .      .  .   .   .         .              .        .
lrwxrwxrwx   1 root root   20 Aug 21 17:00 S98postgresq -> ../init.d/postgresql

There is an 'l' missing from the name!  I thought for a moment
I found the culprit, but then I issued the command below:
 /sbin/chkconfig --list | grep '6:on'
and it returned nothing.

I am a bit confused.  As I understand, run level 6 means, in
redhat context, shutdown and reboot.  But it seems in my case
nothing is turned on for level 6.  Then that missing 'l'
is really of no significance?

Any thoughts?  Clues?

Regards,

Tena Sakai
tsakai@gallo.ucsf.edu



-----Original Message-----
From: Scott Marlowe [mailto:scott.marlowe@gmail.com]
Sent: Thu 9/25/2008 12:46 PM
To: Tena Sakai
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] postgres at reboot
 
On Thu, Sep 25, 2008 at 1:42 PM, Tena Sakai <tsakai@gallo.ucsf.edu> wrote:
> Hi Everybody,
>
> About 1.5 month ago, my machine (which runs redhat linux
> 2.6.9-78.0.1.ELsmp on Dell hardware with postgres 8.3.3)
> had a terrible crash.  I am mostly recovered, but there
> is at least one more thing that's not right.
>
> Namely, when the machine gets rebooted, postgres doesn't
> start automatically.  Before the crash, there was no such
> problem.

In RH, you use chkconfig to see what's set to start:

chkconfig --list

will show you all the services and what run levels they come up in.

chkconfig servicename on|off -- will turn a service on or off at boot.

service servicename start -- will start a service.

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: postgres at reboot
@ 2008-09-26 20:44  Scott Marlowe <scott.marlowe@gmail.com>
  parent: Tena Sakai <tsakai@gallo.ucsf.edu>
  0 siblings, 1 reply; 6+ messages in thread

From: Scott Marlowe @ 2008-09-26 20:44 UTC (permalink / raw)
  To: Tena Sakai <tsakai@gallo.ucsf.edu>; +Cc: pgsql-admin

On Fri, Sep 26, 2008 at 2:38 PM, Tena Sakai <tsakai@gallo.ucsf.edu> wrote:
> Hi Scott,
>
> When I issue: /sbin/chkconfig --list | grep postgres
> it comes back with:
>
>  postgresql_ORG  0:off   1:off   2:off   3:off   4:off   5:off   6:off
>  postgresql      0:off   1:off   2:on    3:on    4:on    5:on    6:off
>
> I felt a bit strange that it says 'off' at run level 6.

Run level 6 is reboot, so that's normal.

> I went into /etc/rc.d and issued:
>  sudo find . -name \*postgresql\* -ls | grep S98postgresql
> and it came back with:
>
>  15618186    0 lrwxrwxrwx   1 root     root           20 Aug 21 17:00
> ./rc4.d/S98postgresql -> ../init.d/postgresql
>  15618294    0 lrwxrwxrwx   1 root     root           20 Aug 21 17:00
> ./rc3.d/S98postgresql -> ../init.d/postgresql
>  15618351    0 lrwxrwxrwx   1 root     root           20 Aug 21 17:00
> ./rc2.d/S98postgresql -> ../init.d/postgresql
>  15618024    0 lrwxrwxrwx   1 root     root           20 Aug 21 17:00
> ./rc5.d/S98postgresql -> ../init.d/postgresql
>
> Next, I went into /etc/rc.d/rc6.d and typed:
>  ls -l
> and it gave me this:
>      .       .  .    .      .  .   .   .         .              .        .
>      .       .  .    .      .  .   .   .         .              .        .
> lrwxrwxrwx   1 root root   20 Aug 21 17:00 S98postgresq ->
> ../init.d/postgresql
>
> There is an 'l' missing from the name!  I thought for a moment

It shouldn't  be there, sounds like someone added it by hand.

> I found the culprit, but then I issued the command below:
>  /sbin/chkconfig --list | grep '6:on'
> and it returned nothing.
>
> I am a bit confused.  As I understand, run level 6 means, in
> redhat context, shutdown and reboot.  But it seems in my case
> nothing is turned on for level 6.  Then that missing 'l'
> is really of no significance?

Right, nothing should be started for those run levels.



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: postgres at reboot
@ 2008-09-26 21:11  Tena Sakai <tsakai@gallo.ucsf.edu>
  parent: Scott Marlowe <scott.marlowe@gmail.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Tena Sakai @ 2008-09-26 21:11 UTC (permalink / raw)
  To: Scott Marlowe <scott.marlowe@gmail.com>; +Cc: pgsql-admin

Hi Scott,

It's too bad (in this particular case) that you are
agreeing with me!  I want someone to find a hole in
my logic so that I can find a handle to fix the
problem.  The problem being that postgres doesn't get
started when the machine gets rebooted.

Regards,

Tena Sakai
tsakai@gallo.ucsf.edu


-----Original Message-----
From: Scott Marlowe [mailto:scott.marlowe@gmail.com]
Sent: Fri 9/26/2008 1:44 PM
To: Tena Sakai
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] postgres at reboot
 
On Fri, Sep 26, 2008 at 2:38 PM, Tena Sakai <tsakai@gallo.ucsf.edu> wrote:
> Hi Scott,
>
> When I issue: /sbin/chkconfig --list | grep postgres
> it comes back with:
>
>  postgresql_ORG  0:off   1:off   2:off   3:off   4:off   5:off   6:off
>  postgresql      0:off   1:off   2:on    3:on    4:on    5:on    6:off
>
> I felt a bit strange that it says 'off' at run level 6.

Run level 6 is reboot, so that's normal.

> I went into /etc/rc.d and issued:
>  sudo find . -name \*postgresql\* -ls | grep S98postgresql
> and it came back with:
>
>  15618186    0 lrwxrwxrwx   1 root     root           20 Aug 21 17:00
> ./rc4.d/S98postgresql -> ../init.d/postgresql
>  15618294    0 lrwxrwxrwx   1 root     root           20 Aug 21 17:00
> ./rc3.d/S98postgresql -> ../init.d/postgresql
>  15618351    0 lrwxrwxrwx   1 root     root           20 Aug 21 17:00
> ./rc2.d/S98postgresql -> ../init.d/postgresql
>  15618024    0 lrwxrwxrwx   1 root     root           20 Aug 21 17:00
> ./rc5.d/S98postgresql -> ../init.d/postgresql
>
> Next, I went into /etc/rc.d/rc6.d and typed:
>  ls -l
> and it gave me this:
>      .       .  .    .      .  .   .   .         .              .        .
>      .       .  .    .      .  .   .   .         .              .        .
> lrwxrwxrwx   1 root root   20 Aug 21 17:00 S98postgresq ->
> ../init.d/postgresql
>
> There is an 'l' missing from the name!  I thought for a moment

It shouldn't  be there, sounds like someone added it by hand.

> I found the culprit, but then I issued the command below:
>  /sbin/chkconfig --list | grep '6:on'
> and it returned nothing.
>
> I am a bit confused.  As I understand, run level 6 means, in
> redhat context, shutdown and reboot.  But it seems in my case
> nothing is turned on for level 6.  Then that missing 'l'
> is really of no significance?

Right, nothing should be started for those run levels.

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2008-09-26 21:11 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-09-25 19:08 postgres at reboot Calvin Hom <chom@gallo.ucsf.edu>
2008-09-25 19:42 postgres at reboot Tena Sakai <tsakai@gallo.ucsf.edu>
2008-09-25 19:46 ` Scott Marlowe <scott.marlowe@gmail.com>
2008-09-26 20:38   ` Tena Sakai <tsakai@gallo.ucsf.edu>
2008-09-26 20:44     ` Scott Marlowe <scott.marlowe@gmail.com>
2008-09-26 21:11       ` Tena Sakai <tsakai@gallo.ucsf.edu>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox