pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fabrízio de Royes Mello <fmello@dbseller.com.br>
Cc: pgsql-admin@postgresql.org
Subject: Re: backup server - how to disconnect
Date: Wed, 15 Oct 2008 18:48:18 -0300
Message-ID: <48F66522.4000104@dbseller.com.br> (raw)
In-Reply-To: <48F65FC0.4040000@dbseller.com.br>
References: <85E425230440405C821801ED937EDC49@dei26g028534>
	<48F65FC0.4040000@dbseller.com.br>

Hi all,

Sorry, but I found a little bug in the command line...

To solve just replace "$i" for "$pid":

for pid in `psql -A -t -c "select procpid from pg_stat_activity"`; do 
pg_ctl kill TERM $pid; done

Sorry... :-)

Fabrízio de Royes Mello escreveu:
> Hello Mark,
> 
> I don't know a command in postgres to do that, but if you're running 
> postgres on Linux try it on the command line:
> 
> for pid in `psql -A -t -c "select procpid from pg_stat_activity"`; do 
> pg_ctl kill TERM $i; done
> 
> 
> Best regards.
> 
> Ps: Sorry, but my english isn't so good.
> 

Cordialmente,

-- 
Fabrízio de Royes Mello
Coordenador Desenvolvimento de Software
fmello@dbseller.com.br
DBSeller Informática Ltda. - http://www.dbseller.com.br
(51) 3076-5101



view thread (4+ messages)

Message-ID: <48F66522.4000104@dbseller.com.br>
Permalink:  ../48F66522.4000104@dbseller.com.br/
Also on:    postgresql.org/message-id/48F66522.4000104@dbseller.com.br

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: fmello@dbseller.com.br
  Subject: Re: backup server - how to disconnect
  In-Reply-To: <48F66522.4000104@dbseller.com.br>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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