pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Is there a way to view active connections?
3+ messages / 2 participants
[nested] [flat]

* Is there a way to view active connections?
@ 2016-05-24 19:57 Fred Parkinson <FredP@abag.ca.gov>
  2016-05-24 20:00 ` Re: Is there a way to view active connections? Keith <keith@keithf4.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Fred Parkinson @ 2016-05-24 19:57 UTC (permalink / raw)
  To: pgsql-admin

I want to do a server restart, so I issued the command
pg-ctl -w restart -D /usr/local/pgsql/data

However, the shut down fails:
pg_ctl: server does not shut down.

Unfortunately, when I try to see who is connected with psql, I get
FATAL: the database system is shutting down.

Is there any other way to see who is still connected?

Thanks  --Fred


ABAG is moving.
Effective Monday May 23, 2016 our mailing address and location will be:
Association of Bay Area Governments
375 Beale Street, Suite 700
San Francisco, CA 94105
(415) 820-7900

My email address will remain the same.
My phone number will be (415) 820-79XX (last two digits remain the same).
We look forward to seeing you at our new location along with our regional partners, the Metropolitan Transportation Commission and the Bay Area Air Quality Management District.
In the meantime, it's business as usual at our current location in Oakland.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Is there a way to view active connections?
  2016-05-24 19:57 Is there a way to view active connections? Fred Parkinson <FredP@abag.ca.gov>
@ 2016-05-24 20:00 ` Keith <keith@keithf4.com>
  2016-05-24 20:05   ` Re: Is there a way to view active connections? Fred Parkinson <FredP@abag.ca.gov>
  0 siblings, 1 reply; 3+ messages in thread

From: Keith @ 2016-05-24 20:00 UTC (permalink / raw)
  To: Fred Parkinson <FredP@abag.ca.gov>; +Cc: pgsql-admin

On Tue, May 24, 2016 at 3:57 PM, Fred Parkinson <FredP@abag.ca.gov> wrote:

> I want to do a server restart, so I issued the command
> pg-ctl -w restart -D /usr/local/pgsql/data
>
> However, the shut down fails:
> pg_ctl: server does not shut down.
>
> Unfortunately, when I try to see who is connected with psql, I get
> FATAL: the database system is shutting down.
>
> Is there any other way to see who is still connected?
>
> Thanks  --Fred
>
>
> *ABAG is moving*.
> Effective Monday May 23, 2016 our mailing address and location will be:
> Association of Bay Area Governments
> 375 Beale Street, Suite 700
> San Francisco, CA 94105
> (415) 820-7900
>
> My email address will remain the same.
> My phone number will be (415) 820-79XX (last two digits remain the same).
> We look forward to seeing you at our new location along with our regional
> partners, the Metropolitan Transportation Commission and the Bay Area Air
> Quality Management District.
> In the meantime, it's business as usual at our current location in Oakland.
>
>

Try using the option "-m fast" to either the shutdown or restart command to
pg_ctl

pg-ctl -w restart -D /usr/local/pgsql/data -m fast

This disconnects any sessions currently connected. Thankfully in 9.5, this
has become the default shutdown mode. Prior to 9.5, "-m smart" was the
default which waits for all active connections to disconnect themselves.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Is there a way to view active connections?
  2016-05-24 19:57 Is there a way to view active connections? Fred Parkinson <FredP@abag.ca.gov>
  2016-05-24 20:00 ` Re: Is there a way to view active connections? Keith <keith@keithf4.com>
@ 2016-05-24 20:05   ` Fred Parkinson <FredP@abag.ca.gov>
  0 siblings, 0 replies; 3+ messages in thread

From: Fred Parkinson @ 2016-05-24 20:05 UTC (permalink / raw)
  To: Keith <keith@keithf4.com>; +Cc: pgsql-admin

Thanks, that worked.
I didn't really want to disconnect anyone active, but I had no other choice.
At least the restart accomplished what I wanted!


>>> On 5/24/2016 at 1:00 PM, Keith <keith@keithf4.com> wrote:


On Tue, May 24, 2016 at 3:57 PM, Fred Parkinson <FredP@abag.ca.gov> wrote:


I want to do a server restart, so I issued the command
pg-ctl -w restart -D /usr/local/pgsql/data

However, the shut down fails:
pg_ctl: server does not shut down.

Unfortunately, when I try to see who is connected with psql, I get
FATAL: the database system is shutting down.

Is there any other way to see who is still connected?

Thanks --Fred


ABAG is moving. 
Effective Monday May 23, 2016 our mailing address and location will be: 
Association of Bay Area Governments 
375 Beale Street, Suite 700 
San Francisco, CA 94105 
(415) 820-7900 

My email address will remain the same. 
My phone number will be (415) 820-79XX (last two digits remain the same). 
We look forward to seeing you at our new location along with our regional partners, the Metropolitan Transportation Commission and the Bay Area Air Quality Management District. 
In the meantime, it's business as usual at our current location in Oakland.



Try using the option "-m fast" to either the shutdown or restart command to pg_ctl

pg-ctl -w restart -D /usr/local/pgsql/data -m fast

This disconnects any sessions currently connected. Thankfully in 9.5, this has become the default shutdown mode. Prior to 9.5, "-m smart" was the default which waits for all active connections to disconnect themselves.


ABAG is moving.
Effective Monday May 23, 2016 our mailing address and location will be:
Association of Bay Area Governments
375 Beale Street, Suite 700
San Francisco, CA 94105
(415) 820-7900

My email address will remain the same.
My phone number will be (415) 820-79XX (last two digits remain the same).
We look forward to seeing you at our new location along with our regional partners, the Metropolitan Transportation Commission and the Bay Area Air Quality Management District.
In the meantime, it's business as usual at our current location in Oakland.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2016-05-24 20:05 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-05-24 19:57 Is there a way to view active connections? Fred Parkinson <FredP@abag.ca.gov>
2016-05-24 20:00 ` Keith <keith@keithf4.com>
2016-05-24 20:05   ` Fred Parkinson <FredP@abag.ca.gov>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox