pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Hammond <ahammond@ca.afilias.info>
To: bala srini <bala.srini@rediffmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: How to disconnect client from Server forcefully
Date: Mon, 23 Aug 2004 11:14:09 -0400
Message-ID: <412A09C1.4000906@ca.afilias.info> (raw)
In-Reply-To: <20040823044758.21817.qmail@webmail18.rediffmail.com>
References: <20040823044758.21817.qmail@webmail18.rediffmail.com>

-----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-----



view thread (8+ messages)

Message-ID: <412A09C1.4000906@ca.afilias.info>
Permalink:  ../412A09C1.4000906@ca.afilias.info/
Also on:    postgresql.org/message-id/412A09C1.4000906@ca.afilias.info

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: ahammond@ca.afilias.info, bala.srini@rediffmail.com
  Subject: Re: How to disconnect client from Server forcefully
  In-Reply-To: <412A09C1.4000906@ca.afilias.info>
  References: <20040823044758.21817.qmail@webmail18.rediffmail.com> <412A09C1.4000906@ca.afilias.info>

* 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