Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D559264FEC3 for ; Wed, 15 Oct 2008 18:47:37 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 56789-03 for ; Wed, 15 Oct 2008 18:47:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from hm451.hospedagemdesites.ws (hm451-2.hospedagemdesites.ws [200.234.221.27]) by postgresql.org (Postfix) with SMTP id 41BD464FCFB for ; Wed, 15 Oct 2008 18:47:33 -0300 (ADT) Received: (qmail 19060 invoked from network); 15 Oct 2008 21:47:30 -0000 Received: from unknown (HELO plesk04.hospedagemdesites.ws) (200.234.222.236) by hm451.hospedagemdesites.ws with SMTP; 15 Oct 2008 21:47:30 -0000 Received: (qmail 19425 invoked from network); 15 Oct 2008 18:47:30 -0300 Received: from 189.27.203.79.adsl.gvt.net.br (HELO ?192.168.0.10?) (189.27.203.79) by plesk04.hospedagemdesites.ws with SMTP; 15 Oct 2008 18:47:30 -0300 Message-ID: <48F66522.4000104@dbseller.com.br> Date: Wed, 15 Oct 2008 18:48:18 -0300 From: =?UTF-8?B?RmFicsOtemlvIGRlIFJveWVzIE1lbGxv?= Reply-To: fmello@dbseller.com.br Organization: DBSeller Sistemas Integrados User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 CC: pgsql-admin@postgresql.org Subject: Re: backup server - how to disconnect References: <85E425230440405C821801ED937EDC49@dei26g028534> <48F65FC0.4040000@dbseller.com.br> In-Reply-To: <48F65FC0.4040000@dbseller.com.br> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.698 tagged_above=0 required=5 tests=MISSING_HEADERS=1.581, RCVD_IN_SORBS_WEB=1.117 X-Spam-Level: ** X-Archive-Number: 200810/114 X-Sequence-Number: 30570 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