pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: How to disconnect client from Server forcefully
8+ messages / 4 participants
[nested] [flat]

* Re: How to disconnect client from Server forcefully
@ 2004-08-20 11:32  Olivier Hubaut <olivier@scmbb.ulb.ac.be>
  parent: bala srini <bala.srini@rediffmail.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Olivier Hubaut @ 2004-08-20 11:32 UTC (permalink / raw)
  To: bala srini <bala.srini@rediffmail.com>; pgsql-admin

On 20 Aug 2004 12:05:47 -0000, bala srini <bala.srini@rediffmail.com>  
wrote:

> Hi
>   I want to disconnect all already established REMOTE DB connections  
> from the server without restarting the Postmaster daemon. Requirement is  
> that diconnect should be done from the server side. Actually I tried to  
> kill the corresponding process(Remote Db connection) in the server. But  
> server is automatically respawning the connection. Can you please help  
> me out in this?
>
> Regards
> Srini.
>
In fact, I think it's not the server that respawn the connection but  
simply the client that make a new connection when it goes disconnected.  
Can't you use any firewall to simply block remote connection on the  
postmaster host (or simply on the 5432 port)?


-- 
Downloading signature ... 99%
*CRC FAILED*
signature aborted



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* How to disconnect client from Server forcefully
@ 2004-08-20 12:05  bala srini <bala.srini@rediffmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: bala srini @ 2004-08-20 12:05 UTC (permalink / raw)
  To: pgsql-admin

Hi
  I want to disconnect all already established REMOTE DB connections from the server without restarting the Postmaster daemon. Requirement is that diconnect should be done from the server side. Actually I tried to kill the corresponding process(Remote Db connection) in the server. But server is automatically respawning the connection. Can you please help me out in this?

Regards
Srini.
  

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How to disconnect client from Server forcefully
@ 2004-08-20 12:39  bala srini <bala.srini@rediffmail.com>
  0 siblings, 0 replies; 8+ messages in thread

From: bala srini @ 2004-08-20 12:39 UTC (permalink / raw)
  To: pgsql-admin; +Cc: Olivier Hubaut <olivier@scmbb.ulb.ac.be>

Thanks for ur reply...
Actually I can set the tcpipsocket option in postgresql.conf file to false. This will block all further remote connection to my server. But what will happen to already existing remote connection? I want to disconnect this also ..  

Sorry I can't change the firewall settings...

Regards
Srini

On Fri, 20 Aug 2004 Olivier Hubaut wrote :
>On 20 Aug 2004 12:05:47 -0000, bala srini <bala.srini@rediffmail.com>  wrote:
>
>>Hi
>>   I want to disconnect all already established REMOTE DB connections  from the server without restarting the Postmaster daemon. Requirement is  that diconnect should be done from the server side. Actually I tried to  kill the corresponding process(Remote Db connection) in the server. But  server is automatically respawning the connection. Can you please help  me out in this?
>>
>>Regards
>>Srini.
>>
>In fact, I think it's not the server that respawn the connection but  simply the client that make a new connection when it goes disconnected.  Can't you use any firewall to simply block remote connection on the  postmaster host (or simply on the 5432 port)?
>
>
>-- Downloading signature ... 99%
>*CRC FAILED*
>signature aborted

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How to disconnect client from Server forcefully
@ 2004-08-20 12:55  G u i d o B a r o s i o <gbarosio@uolsinectis.com.ar>
  0 siblings, 0 replies; 8+ messages in thread

From: G u i d o B a r o s i o @ 2004-08-20 12:55 UTC (permalink / raw)
  To: bala.srini@rediffmail.com; pgsql-admin; olivier@scmbb.ulb.ac.be

how do you kill the process?

Regards,
Guido

> > Thanks for ur reply...
> Actually I can set the tcpipsocket option in postgresql.conf file to false. This will block all further remote connection to my server. But what will happen to already existing remote connection? I want to disconnect this also ..  
> 
> Sorry I can't change the firewall settings...
> 
> Regards
> Srini
> 
> On Fri, 20 Aug 2004 Olivier Hubaut wrote :
> >On 20 Aug 2004 12:05:47 -0000, bala srini <bala.srini@rediffmail.com>  wrote:
> >
> >>Hi
> >>   I want to disconnect all already established REMOTE DB connections  from the server without restarting the Postmaster daemon. Requirement is  that diconnect should be done from the server side. Actually I tried to  kill the corresponding process(Remote Db connection) in the server. But  server is automatically respawning the connection. Can you please help  me out in this?
> >>
> >>Regards
> >>Srini.
> >>
> >In fact, I think it's not the server that respawn the connection but  simply the client that make a new connection when it goes disconnected.  Can't you use any firewall to simply block remote connection on the  postmaster host (or simply on the 5432 port)?
> >
> >
> >-- Downloading signature ... 99%
> >*CRC FAILED*
> >signature aborted




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How to disconnect client from Server forcefully
@ 2004-08-20 12:58  G u i d o B a r o s i o <gbarosio@uolsinectis.com.ar>
  0 siblings, 0 replies; 8+ messages in thread

From: G u i d o B a r o s i o @ 2004-08-20 12:58 UTC (permalink / raw)
  To: bala.srini@rediffmail.com; pgsql-admin; olivier@scmbb.ulb.ac.be

Also,...

   how does the aplication performs the connection?
   Describe the enviroment please. (web, perl (Pg) -> db ie)

guido
   

> > Thanks for ur reply...
> Actually I can set the tcpipsocket option in postgresql.conf file to false. This will block all further remote connection to my server. But what will happen to already existing remote connection? I want to disconnect this also ..  
> 
> Sorry I can't change the firewall settings...
> 
> Regards
> Srini
> 
> On Fri, 20 Aug 2004 Olivier Hubaut wrote :
> >On 20 Aug 2004 12:05:47 -0000, bala srini <bala.srini@rediffmail.com>  wrote:
> >
> >>Hi
> >>   I want to disconnect all already established REMOTE DB connections  from the server without restarting the Postmaster daemon. Requirement is  that diconnect should be done from the server side. Actually I tried to  kill the corresponding process(Remote Db connection) in the server. But  server is automatically respawning the connection. Can you please help  me out in this?
> >>
> >>Regards
> >>Srini.
> >>
> >In fact, I think it's not the server that respawn the connection but  simply the client that make a new connection when it goes disconnected.  Can't you use any firewall to simply block remote connection on the  postmaster host (or simply on the 5432 port)?
> >
> >
> >-- Downloading signature ... 99%
> >*CRC FAILED*
> >signature aborted




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How to disconnect client from Server forcefully
@ 2004-08-20 13:04  bala srini <bala.srini@rediffmail.com>
  0 siblings, 0 replies; 8+ messages in thread

From: bala srini @ 2004-08-20 13:04 UTC (permalink / raw)
  To: G u i d o B a r o s i o <gbarosio@uolsinectis.com.ar>; +Cc: pgsql-admin; olivier@scmbb.ulb.ac.be

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.


On Fri, 20 Aug 2004 G u i d o B a r o s i o wrote :
>Also,...
>
>    how does the aplication performs the connection?
>    Describe the enviroment please. (web, perl (Pg) -> db ie)
>
>guido
>
>
> > > Thanks for ur reply...
> > Actually I can set the tcpipsocket option in postgresql.conf file to false. This will block all further remote connection to my server. But what will happen to already existing remote connection? I want to disconnect this also ..
> >
> > Sorry I can't change the firewall settings...
> >
> > Regards
> > Srini
> >
> > On Fri, 20 Aug 2004 Olivier Hubaut wrote :
> > >On 20 Aug 2004 12:05:47 -0000, bala srini <bala.srini@rediffmail.com>  wrote:
> > >
> > >>Hi
> > >>   I want to disconnect all already established REMOTE DB connections  from the server without restarting the Postmaster daemon. Requirement is  that diconnect should be done from the server side. Actually I tried to  kill the corresponding process(Remote Db connection) in the server. But  server is automatically respawning the connection. Can you please help  me out in this?
> > >>
> > >>Regards
> > >>Srini.
> > >>
> > >In fact, I think it's not the server that respawn the connection but  simply the client that make a new connection when it goes disconnected.  Can't you use any firewall to simply block remote connection on the  postmaster host (or simply on the 5432 port)?
> > >
> > >
> > >-- Downloading signature ... 99%
> > >*CRC FAILED*
> > >signature aborted
>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How to disconnect client from Server forcefully
@ 2004-08-23 04:47  bala srini <bala.srini@rediffmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: bala srini @ 2004-08-23 04:47 UTC (permalink / raw)
  To: pgsql-admin; +Cc: olivier@scmbb.ulb.ac.be, "G u i d o B a r o s i o" <gbarosio@uolsinectis.com.ar>

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.
>
>
>On Fri, 20 Aug 2004 G u i d o B a r o s i o wrote :
> >Also,...
> >
> >    how does the aplication performs the connection?
> >    Describe the enviroment please. (web, perl (Pg) -> db ie)
> >
> >guido
> >
> >
> > > > Thanks for ur reply...
> > > Actually I can set the tcpipsocket option in postgresql.conf file to false. This will block all further remote connection to my server. But what will happen to already existing remote connection? I want to disconnect this also ..
> > >
> > > Sorry I can't change the firewall settings...
> > >
> > > Regards
> > > Srini
> > >
> > > On Fri, 20 Aug 2004 Olivier Hubaut wrote :
> > > >On 20 Aug 2004 12:05:47 -0000, bala srini <bala.srini@rediffmail.com>  wrote:
> > > >
> > > >>Hi
> > > >>   I want to disconnect all already established REMOTE DB connections  from the server without restarting the Postmaster daemon. Requirement is  that diconnect should be done from the server side. Actually I tried to  kill the corresponding process(Remote Db connection) in the server. But  server is automatically respawning the connection. Can you please help  me out in this?
> > > >>
> > > >>Regards
> > > >>Srini.
> > > >>
> > > >In fact, I think it's not the server that respawn the connection but  simply the client that make a new connection when it goes disconnected.  Can't you use any firewall to simply block remote connection on the  postmaster host (or simply on the 5432 port)?
> > > >
> > > >
> > > >-- Downloading signature ... 99%
> > > >*CRC FAILED*
> > > >signature aborted
> >

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How to disconnect client from Server forcefully
@ 2004-08-23 15:14  Andrew Hammond <ahammond@ca.afilias.info>
  parent: bala srini <bala.srini@rediffmail.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Andrew Hammond @ 2004-08-23 15:14 UTC (permalink / raw)
  To: bala srini <bala.srini@rediffmail.com>; +Cc: pgsql-admin

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



^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2004-08-23 15:14 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-08-20 12:05 How to disconnect client from Server forcefully bala srini <bala.srini@rediffmail.com>
2004-08-20 11:32 ` Olivier Hubaut <olivier@scmbb.ulb.ac.be>
2004-08-20 12:39 Re: How to disconnect client from Server forcefully bala srini <bala.srini@rediffmail.com>
2004-08-20 12:55 Re: How to disconnect client from Server forcefully G u i d o B a r o s i o <gbarosio@uolsinectis.com.ar>
2004-08-20 12:58 Re: How to disconnect client from Server forcefully G u i d o B a r o s i o <gbarosio@uolsinectis.com.ar>
2004-08-20 13:04 Re: How to disconnect client from Server forcefully bala srini <bala.srini@rediffmail.com>
2004-08-23 04:47 Re: How to disconnect client from Server forcefully bala srini <bala.srini@rediffmail.com>
2004-08-23 15:14 ` Andrew Hammond <ahammond@ca.afilias.info>

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