Unix Technical Forum

Single User mode

This is a discussion on Single User mode within the pgsql Admins forums, part of the PostgreSQL category; --> I was curious if there was a better way of killing the "postgres" process? I needed to place out ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 01:13 AM
Theo Galanakis
 
Posts: n/a
Default Single User mode


I was curious if there was a better way of killing the "postgres" process? I
needed to place out DB in single user mode Using "postgres". Once I had
finished and exited "postgres", I could not start up "pg_ctl" the database
as postgres was still running. Is there a elequant way then just using :
kill -9 [#postgres-pid#]?

Theo


__________________________________________________ ____________________
This email, including attachments, is intended only for the addressee
and may be confidential, privileged and subject to copyright. If you
have received this email in error, please advise the sender and delete
it. If you are not the intended recipient of this email, you must not
use, copy or disclose its content to anyone. You must not copy or
communicate to others content that is confidential or subject to
copyright, unless you have the consent of the content owner.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 01:13 AM
Joshua D. Drake
 
Posts: n/a
Default Re: Single User mode

Theo Galanakis wrote:

> I was curious if there was a better way of killing the "postgres"
> process? I needed to place out DB in single user mode Using
> "postgres". Once I had finished and exited "postgres", I could not
> start up "pg_ctl" the database as postgres was still running. Is there
> a elequant way then just using : kill -9 [#postgres-pid#]?
>

-TERM



> Theo
>
> __________________________________________________ ____________________
> This email, including attachments, is intended only for the addressee
> and may be confidential, privileged and subject to copyright. If you
> have received this email in error, please advise the sender and delete
> it. If you are not the intended recipient of this email, you must not
> use, copy or disclose its content to anyone. You must not copy or
> communicate to others content that is confidential or subject to
> copyright, unless you have the consent of the content owner.
>



--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 01:14 AM
Gourish Singbal
 
Posts: n/a
Default Re: Single User mode

Theo,

kill -9 [#postgres-pid#]? might be harmful to your database use one of
the below comands to shutsdown ur database when there are clients
connected and u want to shutdown ur server:-

/usr/local/pgsql/bin/pg_ctl -m smart stop
#Waits for all users to logout (Oracle analagous to Shutdown)
/usr/local/pgsql/bin/pg_ctl -m fast stop
# All active transactions get rolled back (Oracle analagous to
shutdown transactional)
/usr/local/pgsql/bin/pg_ctl -D data -m immediate stop
#Waits # Immediate shutdown will need recovery next time up (Oracle
analoguos shutdown abort)

Reffrence:- http://www.osmosislatina.com/postgres/part2_2.htm

Best
Gourish

On Wed, 22 Dec 2004 16:17:53 +1100, Theo Galanakis
<Theo.Galanakis@lonelyplanet.com.au> wrote:
>
>
> I was curious if there was a better way of killing the "postgres" process? I
> needed to place out DB in single user mode Using "postgres". Once I had
> finished and exited "postgres", I could not start up "pg_ctl" the database
> as postgres was still running. Is there a elequant way then just using :
> kill -9 [#postgres-pid#]?
>
> Theo
> __________________________________________________ ____________________
> This email, including attachments, is intended only for the addressee
> and may be confidential, privileged and subject to copyright. If you
> have received this email in error, please advise the sender and delete
> it. If you are not the intended recipient of this email, you must not
> use, copy or disclose its content to anyone. You must not copy or
> communicate to others content that is confidential or subject to
> copyright, unless you have the consent of the content owner.
>



--
Best,
Gourish Singbal

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:42 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com