Re: pg_ctrl stop problems (psql 8.2.5) - Mailing list pgsql-general

From F. Jovan Jester
Subject Re: pg_ctrl stop problems (psql 8.2.5)
Date
Msg-id 31ed54e50803260033k4a2a9813r718523499d4dcd21@mail.gmail.com
Whole thread Raw
In response to Re: pg_ctrl stop problems (psql 8.2.5)  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Responses Re: pg_ctrl stop problems (psql 8.2.5)  (Zdeněk Kotala <Zdenek.Kotala@Sun.COM>)
List 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.Kotala@sun.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@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

pgsql-general by date:

Previous
From: Greg Smith
Date:
Subject: Re: PostgreSQL Replication with read-only access to standby DB
Next
From: "Stefan Sturm"
Date:
Subject: Re: Install Postgresql on Win2000 with Admin Rights