pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Spiegelberg, Greg <gspiegelberg@cranel.com>
To: PGSQL Admin <pgsql-admin@postgresql.org>
Subject: Re: Forcing connections closed
Date: Mon, 2 Feb 2004 07:53:08 -0500
Message-ID: <387C22290D3FD71195D300508BF7DB5238AEA9@colmail01.cranel.com> (raw)

If the system in question is ...

1. a Linux or *BSD AND
2. has ipchains/iptables/whatever firewall software installed AND
3. the connections in question to be killed are coming in via
   port 5432/tcp

then I would think you could temporarily change the firewall configuration
on the system such that all traffic from the remote IP, or even localhost,
on 5432/tcp gets dropped and possibly the connection should drop as well.
If it doesn't then you may additionally tweak your tcp_keepalive_time to
0 before changing the firewall rule.  Just remember to drop that firewall
rule and set the tcp_keepalive_time back when you're done.

Just random thoughts.

Greg


-----Original Message-----
From: Juan Miguel
To: PGSQL Admin
Sent: 2/1/04 4:47 PM
Subject: Re: [ADMIN] Forcing connections closed


>'kill -9' PID will force all backends to flush cache for no good
reason.
>
>Note that on most unixes, a plain kill PID will send the term signal, 
>which tells the process to poltely shutdown and release resources.
kill 
>-9 is like using a sledge hammer to swat a fly for this.
>
>
>---------------------------(end of
broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
>  
>
;-) Yes, you are on the right. "kill -9", is the last try, but often you

have to do "kill -9" for killing a procces, even sometimes, 'kill -9' 
does not work (often when the process is acceding to a hardware device -

a CD for example -).



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html



view thread (9+ messages)

Message-ID: <387C22290D3FD71195D300508BF7DB5238AEA9@colmail01.cranel.com>
Permalink:  ../387C22290D3FD71195D300508BF7DB5238AEA9@colmail01.cranel.com/
Also on:    postgresql.org/message-id/387C22290D3FD71195D300508BF7DB5238AEA9@colmail01.cranel.com

 · 

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: gspiegelberg@cranel.com
  Subject: Re: Forcing connections closed
  In-Reply-To: <387C22290D3FD71195D300508BF7DB5238AEA9@colmail01.cranel.com>
  References: <387C22290D3FD71195D300508BF7DB5238AEA9@colmail01.cranel.com>

* 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