Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b5IbS-0002Tk-M5 for pgsql-admin@arkaria.postgresql.org; Tue, 24 May 2016 20:06:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b5IbS-0002sx-03 for pgsql-admin@arkaria.postgresql.org; Tue, 24 May 2016 20:06:58 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b5IZj-0000wJ-RQ for pgsql-admin@postgresql.org; Tue, 24 May 2016 20:05:11 +0000 Received: from pp-ag2.abag.ca.gov ([198.31.87.12]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b5IZc-0007N7-Iu for pgsql-admin@postgresql.org; Tue, 24 May 2016 20:05:10 +0000 Received: from pps.filterd (pp-ag2.abag.ca.gov [127.0.0.1]) by pp-ag2.abag.ca.gov (8.16.0.11/8.16.0.11) with SMTP id u4OK2JvG003093 for ; Tue, 24 May 2016 13:05:02 -0700 Received: from gwia1.abag.ca.gov ([172.16.1.27]) by pp-ag2.abag.ca.gov with ESMTP id 232n9r8b3m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 24 May 2016 13:05:02 -0700 Received: from d02-MTA by gwia1.abag.ca.gov with Novell_GroupWise; Tue, 24 May 2016 13:05:02 -0700 Message-Id: <5744517F020000A700034C76@gwia1.abag.ca.gov> X-Mailer: Novell GroupWise Internet Agent 14.2.0 Date: Tue, 24 May 2016 13:05:03 -0700 From: "Fred Parkinson" To: "Keith" Cc: Subject: Re: Is there a way to view active connections? References: <57444FA1020000A700034C71@gwia1.abag.ca.gov> In-Reply-To: Mime-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-05-24_09:,, signatures=0 X-Pg-Spam-Score: -5.6 (-----) Content-Type: multipart/alternative; boundary="=__Part370129FF.3__=" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part370129FF.2__= Content-Type: multipart/alternative; boundary="=__Part370129FF.3__=" --=__Part370129FF.3__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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 wrote: On Tue, May 24, 2016 at 3:57 PM, Fred Parkinson 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.=20 Effective Monday May 23, 2016 our mailing address and location will be:=20 Association of Bay Area Governments=20 375 Beale Street, Suite 700=20 San Francisco, CA 94105=20 (415) 820-7900=20 My email address will remain the same.=20 My phone number will be (415) 820-79XX (last two digits remain the = same).=20 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.=20 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. --=__Part370129FF.3__= Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Description: HTML =0A=0A=0A=0A
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:
=0A


On Tue, May 24, = 2016 at 3:57 PM, Fred Parkinson <FredP@abag.ca.gov> = wrote:
=0A=0A=0A=0A
<= div>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

=0A

= 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
<= a shape=3D"rect">(415) 820-7900

<= div> 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.
<= /div>
=0A
=0A


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.
=0A


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
<= br clear=3D"none" />
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 Transportat= ion Commission and the Bay Area Air Quality Management District.
In the meantime, it's business as usual at our current = location in Oakland.

--=__Part370129FF.3__=-- --=__Part370129FF.2__=--