Skip site navigation (1) Skip section navigation (2)

Service goes to maintenance state when stopping postgres

From: "Mahabaleshwarkar, Niraj (Niraj)" <mniraj(at)avaya(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Service goes to maintenance state when stopping postgres
Date: 2008-08-28 07:24:56
Message-ID: DE68C81B5376C947993033A259A8F0B1A2AEB2@301081ANEX1.global.avaya.com (view raw or flat)
Thread:
Lists: pgsql-admin
Hi

I have solaris 10 update 5 installed. PostgreSQL with SMF is shipped
with Solaris 10 update 5.

I could see two services installed on the OS.

svcs postgresql
disabled 14:58:36 svc:/application/database/postgresql:version_81
disabled 15:40:42 svc:/application/database/postgresql:version_82

I followed the steps to start postgres service given on Sun website...

PostgreSQL 8.2:

1. As root, su to postgres:

# su - postgres

2. Create PostgreSQL DB cluster:

$ /usr/postgres/8.2/bin/initdb -D /var/postgres/8.2/data

3. As root, use the SMF's svcadm command to start PostgreSQL:

# /usr/sbin/svcadm enable postgresql:version_82

now I could see one serive enabled.

svcs postgresql
disabled 14:58:36 svc:/application/database/postgresql:version_81
online 15:40:42 svc:/application/database/postgresql:version_82

Now, if I have a psql session connected and I try to disable the service
using...

svcadm disable svc:/application/database/postgresql:version_82

the serivce goes to maintenance mode.

Now, if I try to clear and enable it again it still goes to maintenance
mode.

It comes online only if I close the psql session and enable it again.

Can anyone help me know the way to check that postgres is in use?

Thanx in advance
Niraj

pgsql-admin by date

Next:From: Marco BizzarriDate: 2008-08-28 09:37:27
Subject: Re: fsync off without a restart
Previous:From: RickDate: 2008-08-27 23:52:17
Subject: excluding tables

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group