dbTalk Databases Forums  

how to stop postmaster

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss how to stop postmaster in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Keith Worthington
 
Posts: n/a

Default how to stop postmaster - 10-08-2004 , 01:49 PM






Hi All,

I've just gotten PostgreSQL installed. The problem is now that I have started
the postmaster (incorrectly it appears) how do I stop it? I have read the
tips long enough to know that I shouldn't kill it! Here is what I did.

$ postmaster -D /raid02/databases/
LOG: database system was shut down at 2004-10-08 14:28:45 EDT
LOG: checkpoint record is at 0/8018BC
LOG: redo record is at 0/8018BC; undo record is at 0/0; shutdown TRUE
LOG: next transaction id: 480; next oid: 16976
LOG: database system is ready
$

$ pg_ctl stop -m smart
pg_ctl: cannot find /var/lib/pgsql/data/postmaster.pid
Is postmaster running?
$ ps -ef | grep postmaster
postgres 24379 24089 0 14:29 pts/5 00:00:00 postmaster -D
/raid02/databases/postgres 24481 24089 0 14:36 pts/5 00:00:00 grep postmaster
$ pg_ctl status
pg_ctl: postmaster or postgres is not running
$

I would also like to know how to start the postmaster properly on a permanent
basis. For instance at boot time.

Kind Regards,
Keith

______________________________________________
99main Internet Services http://www.99main.com


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


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: how to stop postmaster - 10-08-2004 , 03:14 PM






"Keith Worthington" <keithw (AT) narrowpathinc (DOT) com> writes:
Quote:
Here is what I did.

$ postmaster -D /raid02/databases/

$ pg_ctl stop -m smart
pg_ctl: cannot find /var/lib/pgsql/data/postmaster.pid
Is postmaster running?
pg_ctl evidently thinks that PGDATA is /var/lib/pgsql/data, which I
suppose it got from an environment variable you have set; but you
told the postmaster to use PGDATA = /raid02/databases. So you need
pg_ctl stop -D /raid02/databases/ -m whatever

Or change your environment variable.

Quote:
I would also like to know how to start the postmaster properly on a permanent
basis. For instance at boot time.
Usually people do that with an init script. There's a simple one in the
source distribution (look in contrib/start-scripts) but you're probably
better off using the one that comes with the RPM distribution.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html



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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.