X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3F1EA5E46F3 for ; Mon, 23 Aug 2004 12:09:09 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 47977-05 for ; Mon, 23 Aug 2004 15:09:11 +0000 (GMT) Received: from mail.libertyrms.com (unknown [207.219.45.62]) by svr1.postgresql.org (Postfix) with ESMTP id E27E95E46C1 for ; Mon, 23 Aug 2004 12:09:03 -0300 (ADT) Received: from dba4.int.libertyrms.com ([10.1.3.13] ident=ahammond) by mail.libertyrms.com with esmtp (Exim 4.22) id 1BzGRZ-0004Ox-Cs; Mon, 23 Aug 2004 11:09:09 -0400 Message-ID: <412A09C1.4000906@ca.afilias.info> Date: Mon, 23 Aug 2004 11:14:09 -0400 From: Andrew Hammond Organization: Afilias Canada Corp. User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040715) X-Accept-Language: en-us, en MIME-Version: 1.0 To: bala srini Cc: pgsql-admin@postgresql.org Subject: Re: How to disconnect client from Server forcefully References: <20040823044758.21817.qmail@webmail18.rediffmail.com> In-Reply-To: <20040823044758.21817.qmail@webmail18.rediffmail.com> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Mail-From: ahammond@ca.afilias.info X-SA-Exim-Scanned: No; SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/216 X-Sequence-Number: 14611 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 bala srini wrote: | Hi All | Can anyone help me reg the below mail? | | Assuming the environment is thru the terminal i.e by setting the PGHOST varaible to server machine and then invoking the command "psql" from client machine. | | Thanks & Regards | Bala. | | | On Fri, 20 Aug 2004 bala srini wrote : | |>Assuming that the enviroment of establishing the connection in client may be anything. I want to terminate these remote connections from server side. |> |>I referred killing the process in server side. this porcess is corresponding to the client connsction. After killing also, Client will respawn the connection. |> |> 0) Use pg_who to identify the offending connection and it's source. Assume it's connecting from host 192.168.0.23 as user "naughty" to database "widgets". 1) Add a rule blocking access to your pg_hba ruleset: host widgets naughty 192.168.0.23 255.255.255.255 reject 2) Tell the postmaster to re-read config files. This adds your new pg_hba rule. pgctl reload 3) Use pg_who (not part of default distro, but available on gborg IIRC) and kill the offending process. The offending process will now fill your log files with failed re-connect notices. - -- Andrew Hammond 416-673-4138 ahammond@ca.afilias.info Database Administrator, Afilias Canada Corp. CB83 2838 4B67 D40F D086 3568 81FC E7E5 27AF 4A9A -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBKgm/gfzn5SevSpoRAolgAKCwoWttsPTs709yEJ+i1Kk18Rqi9ACfeDXI 9Gl2XAxpL+X/nUFgumwCNQk= =v1Gq -----END PGP SIGNATURE-----