Re: manage connections - Mailing list pgsql-novice

From A. Kretschmer
Subject Re: manage connections
Date
Msg-id 20071018094455.GM28331@a-kretschmer.de
Whole thread Raw
In response to manage connections  ("Nikolai Cheltsov" <begimot@gmail.com>)
List pgsql-novice
am  Thu, dem 18.10.2007, um 11:34:29 +0200 mailte Nikolai Cheltsov folgendes:
> Hi All,
>
> I could not find any information about this simple question.
>
> How can I understand who is connected to a given database? How can I kill all
> connections to a database in order, for example, to remove it?

You can use pg_stat_activity to find all connected backends, and you can
use pg_cancel_backend(pid int) to kill a specific backend.

Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

pgsql-novice by date:

Previous
From: "Nikolai Cheltsov"
Date:
Subject: manage connections
Next
From: "Nikolai Cheltsov"
Date:
Subject: connection management