Re: pg_ctrl stop problems (psql 8.2.5)

From: "F(dot) Jovan Jester" <jesterj(at)groupspeak(dot)com>
To: "Zdenek Kotala" <Zdenek(dot)Kotala(at)sun(dot)com>
Cc: "LARC/J(dot)L(dot)Shipman/jshipman" <Jeffery(dot)L(dot)Shipman(at)nasa(dot)gov>, PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_ctrl stop problems (psql 8.2.5)
Date: 2008-03-26 07:33:14
Message-ID: 31ed54e50803260033k4a2a9813r718523499d4dcd21@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

As Zdenek mentioned, in Solaris 10 postgresql is run as a service, so
any attempts at stopping it manually will be detected and it will
automatically be started again.

The syntax was a bit off though (because the service may not
necessarily be called postgresql:version_82, and you need svcadm
instead of svcs for starting or stopping). Try the following:

svcs -a | grep postgres
(this command should show it is online, note the name, probably
something like svc:/application/database/postgresql:postgres)

then, as root do the following:

svcadm disable postgresql
(then do an svcs -a | grep postgres again to verify it's disabled)

That will stop it. To restart:

svcadm enable postgresql

also as root. any svcadm commands require root.

hope that helps

-Jovan

On Tue, Mar 25, 2008 at 11:11 AM, Zdenek Kotala <Zdenek(dot)Kotala(at)sun(dot)com> wrote:
> LARC/J.L.Shipman/jshipman napsal(a):
>
> > Hello,
> > I am running postgresql 8.2.5 on Solaris 10. When I try to shut
> > down postgres using
> >
> > pg_ctrl -D datafile stop
> >
> > it does not shutdown. Does anyone know why this is, or what files
> > pg_ctrl access to determine
> > the shutdown process. We have tried deleting a pgsql semaphore file
> > located in tmp. This did not help. Any help is appreciated.
>
> Solaris uses SMF for starting and stopping postgreSQL. If postgres was started
> by SMF then it tries to restart when it fails (or stopeed another way).
>
> try
>
> svcs postgresql
>
> it shows you status.
>
> svcs disable postgresql:version_82
>
> stop postgresql.
>
> See man postgres_82 for detail.
>
> Zdenek
>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Simon Riggs 2008-03-26 07:55:44 Re: PostgreSQL Replication with read-only access to standby DB
Previous Message Stefan Sturm 2008-03-26 07:28:16 Re: Install Postgresql on Win2000 with Admin Rights