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

Re: it refuses to go down...

From: "Tena Sakai" <tsakai(at)gallo(dot)ucsf(dot)edu>
To: "Peter Koczan" <pjkoczan(at)gmail(dot)com>
Cc: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: it refuses to go down...
Date: 2008-03-25 18:25:14
Message-ID: FE44E0D7EAD2ED4BB2165071DB8E328C0378F162@egcrc-ex01.egcrc.org (view raw or flat)
Thread:
Lists: pgsql-admin
Hello Peter,

Thanks for your post.  I appreciate your concern.

> I had to deal with this recently where the
> status was "notify interrupt"

Is this a response from "pg_ctl status" command?

At the moment, I see nothing alarming via ps:

  $ ps ax | grep post
  11807 ?        Ss     0:00 sshd: postgres [priv]
  11809 ?        S      0:00 sshd: postgres(at)pts/5
  12241 ?        S      0:00 /pgsql/pgsql/bin/postgres
  12243 ?        Ss     2:33 postgres: writer process   
  12244 ?        Ss     0:00 postgres: wal writer process   
  12245 ?        Ss     0:00 postgres: autovacuum launcher process   
  12246 ?        Ss     0:50 postgres: stats collector process   
  13814 ?        SNl  426:30 java -Xms128m -Xmx4600m -jar gadb.jar -loadonly jdbc:db2://172.16.1.109:50001/sci2p mitch winkwink jdbc:postgresql://vixen/canon?prepareThreshold=1 gadb northpole 10
  13828 ?        Ss   234:43 postgres: gadb canon 127.0.0.1(44824) idle in transaction
  13830 ?        Ss   235:51 postgres: gadb canon 127.0.0.1(44826) idle in transaction
  13832 ?        Ss     0:16 postgres: gadb canon 127.0.0.1(44828) idle in transaction
  13833 ?        Ss   235:03 postgres: gadb canon 127.0.0.1(44829) idle in transaction
  13835 ?        Ss   234:54 postgres: gadb canon 127.0.0.1(44831) idle
  13837 ?        Ss   235:48 postgres: gadb canon 127.0.0.1(44833) idle
  13839 ?        Ss   235:12 postgres: gadb canon 127.0.0.1(44835) idle
  13841 ?        Rs   234:32 postgres: gadb canon 127.0.0.1(44837) SELECT
  13843 ?        Ss   234:03 postgres: gadb canon 127.0.0.1(44839) idle in transaction
  13845 ?        Rs   234:20 postgres: gadb canon 127.0.0.1(44841) SELECT
  13847 ?        Ss   235:29 postgres: gadb canon 127.0.0.1(44843) idle in transaction
  14526 ?        Ss    63:15 postgres: ysu canon 127.0.0.1(44853) idle
  16563 ?        Ss     2:06 postgres: autovacuum worker process   canon
  21201 pts/8    S+     0:00 grep post

Regards,

Tena Sakai
tsakai(at)gallo(dot)ucsf(dot)edu


-----Original Message-----
From: Peter Koczan [mailto:pjkoczan(at)gmail(dot)com]
Sent: Tue 3/25/2008 10:59 AM
To: Tena Sakai
Cc: Scott Marlowe; pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] it refuses to go down...
 
>  > did you try pg_ctl -m immediate stop   ???
>
>  I just did, and it worked.
>
>    $ pg_ctl stop -m immediate
>    waiting for server to shut down.... done
>    server stopped

I'd be careful about shutting down using "immediate" mode. It forces
the database into recovery mode.

Your problem could be that one or two connections are in a weird state
and even "fast" stopping can't kill them. Next time you have to
restart the server, you should check on the status of connections and
see if any are in a weird state. I had to deal with this recently
where the status was "notify interrupt" and I couldn't even stop fast.
I had to change some application code, but not much.

Just run "ps ax | grep post" (or whatever options you like to give ps
to show all processes) to filter out postgres processes. A connection
entry will look like like.

[pid] ?        Ss      0:00 postgres: [user] [database] [client] [status]

Peter

In response to

Responses

pgsql-admin by date

Next:From: Marc FrommDate: 2008-03-25 19:31:57
Subject: restore message . . . cascade
Previous:From: Peter KoczanDate: 2008-03-25 17:59:17
Subject: Re: it refuses to go down...

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