Unix Technical Forum

restart error

This is a discussion on restart error within the pgsql Novice forums, part of the PostgreSQL category; --> [postgresql@stell ~]$ ps axuw | grep postmaster 502 11134 0.0 0.2 19292 3020 pts/5 S Sep22 0:00 /usr/local/pgsql/bin/postmaster -D ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 11:14 PM
Ray Stell
 
Posts: n/a
Default restart error

[postgresql@stell ~]$ ps axuw | grep postmaster
502 11134 0.0 0.2 19292 3020 pts/5 S Sep22 0:00 /usr/local/pgsql/bin/postmaster -D /var/pgsql/data
502 21676 0.0 0.0 4788 656 pts/12 S+ 10:42 0:00 grep postmaster
[postgresql@stell ~]$ pg_ctl restart -D /var/pgsql/data
waiting for postmaster to shut down.............................................. ................. failed
pg_ctl: postmaster does not shut down
[postgresql@stell ~]$

yet postmaster is gone:
[postgresql@stell ~]$ ps axuw | grep postmaster
502 21717 0.0 0.0 4640 644 pts/12 R+ 10:52 0:00 grep postmaster

server.log not updated...?
[postgresql@stell ~]$ ls -l /home/postgresql/server.log
-rw-rw-r-- 1 postgresql postgresql 2343 Aug 23 09:48 /home/postgresql/server.log

How can I figure out what the problem is?

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 11:14 PM
Tom Lane
 
Posts: n/a
Default Re: restart error

Ray Stell <stellr@cns.vt.edu> writes:
> [postgresql@stell ~]$ pg_ctl restart -D /var/pgsql/data
> waiting for postmaster to shut down.............................................. ................. failed
> pg_ctl: postmaster does not shut down
> [postgresql@stell ~]$


> yet postmaster is gone:


Looking at the code, it seems that pg_ctl is waiting for the postmaster
lock file (/var/pgsql/data/postmaster.pid) to disappear. Perhaps you've
got some kind of file permissions bollix that prevented the postmaster
from removing that file?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 11:14 PM
Ray Stell
 
Posts: n/a
Default Re: restart error

On Wed, Oct 04, 2006 at 01:28:37PM -0400, Tom Lane wrote:
> Ray Stell <stellr@cns.vt.edu> writes:
> > [postgresql@stell ~]$ pg_ctl restart -D /var/pgsql/data
> > waiting for postmaster to shut down.............................................. ................. failed
> > pg_ctl: postmaster does not shut down
> > [postgresql@stell ~]$

>
> > yet postmaster is gone:

>
> Looking at the code, it seems that pg_ctl is waiting for the postmaster
> lock file (/var/pgsql/data/postmaster.pid) to disappear. Perhaps you've
> got some kind of file permissions bollix that prevented the postmaster
> from removing that file?



Turns out I had an open session in another shell I'd
forgotten about. I tried again with similar results and
as I sent \q on the outstanding session, pm went down instantly:

[postgresql@wireworm global]$ pg_ctl stop -D /usr/pgsql/data
waiting for postmaster to shut down.............................................. .... done
postmaster stopped

Also, kill -15 on active psql sessions let postmaster go down quickly.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-17-2008, 11:14 PM
Sean Davis
 
Posts: n/a
Default Re: restart error

On Thursday 05 October 2006 16:26, Ray Stell wrote:
> On Wed, Oct 04, 2006 at 01:28:37PM -0400, Tom Lane wrote:
> > Ray Stell <stellr@cns.vt.edu> writes:
> > > [postgresql@stell ~]$ pg_ctl restart -D /var/pgsql/data
> > > waiting for postmaster to shut
> > > down.............................................. .................
> > > failed pg_ctl: postmaster does not shut down
> > > [postgresql@stell ~]$
> > >
> > > yet postmaster is gone:

> >
> > Looking at the code, it seems that pg_ctl is waiting for the postmaster
> > lock file (/var/pgsql/data/postmaster.pid) to disappear. Perhaps you've
> > got some kind of file permissions bollix that prevented the postmaster
> > from removing that file?

>
> Turns out I had an open session in another shell I'd
> forgotten about. I tried again with similar results and
> as I sent \q on the outstanding session, pm went down instantly:


select * from pg_stat_activity;

is your friend.

Sean

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-17-2008, 11:14 PM
Shoaib Mir
 
Posts: n/a
Default Re: restart error

OR you can use

pg_ctl -D <data-folder> -mf

Thanks,
----
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

On 10/6/06, Sean Davis <sdavis2@mail.nih.gov> wrote:
>
> On Thursday 05 October 2006 16:26, Ray Stell wrote:
> > On Wed, Oct 04, 2006 at 01:28:37PM -0400, Tom Lane wrote:
> > > Ray Stell <stellr@cns.vt.edu> writes:
> > > > [postgresql@stell ~]$ pg_ctl restart -D /var/pgsql/data
> > > > waiting for postmaster to shut
> > > > down.............................................. .................
> > > > failed pg_ctl: postmaster does not shut down
> > > > [postgresql@stell ~]$
> > > >
> > > > yet postmaster is gone:
> > >
> > > Looking at the code, it seems that pg_ctl is waiting for the

> postmaster
> > > lock file (/var/pgsql/data/postmaster.pid) to disappear. Perhaps

> you've
> > > got some kind of file permissions bollix that prevented the postmaster
> > > from removing that file?

> >
> > Turns out I had an open session in another shell I'd
> > forgotten about. I tried again with similar results and
> > as I sent \q on the outstanding session, pm went down instantly:

>
> select * from pg_stat_activity;
>
> is your friend.
>
> Sean
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-17-2008, 11:14 PM
Ray Stell
 
Posts: n/a
Default Re: restart error

On Fri, Oct 06, 2006 at 01:35:52AM +0500, Shoaib Mir wrote:
> OR you can use
>
> pg_ctl -D <data-folder> -mf


pg_ctl stop -D <data-folder> -mf

nice. Had not found that in google, lots of kill -15 refs

thanks.

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-17-2008, 11:14 PM
Shoaib Mir
 
Posts: n/a
Default Re: restart error

This is actually a fast mode of stopping the database server. You saw a lot
of -15 as all the clients were forcefully disconnected as result of the -mf
switch.

You can find details at -->
http://www.postgresql.org/docs/8.1/i...pp-pg-ctl.html

""Fast" mode does not wait for clients to disconnect. All active
transactions are rolled back and clients are forcibly disconnected, then the
server is shut down"

Thanks,
-----
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

On 10/6/06, Ray Stell <stellr@cns.vt.edu> wrote:
>
> On Fri, Oct 06, 2006 at 01:35:52AM +0500, Shoaib Mir wrote:
> > OR you can use
> >
> > pg_ctl -D <data-folder> -mf

>
> pg_ctl stop -D <data-folder> -mf
>
> nice. Had not found that in google, lots of kill -15 refs
>
> thanks.
>


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:19 AM.


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