pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tena Sakai <tsakai@gallo.ucsf.edu>
To: Samuel Stearns <SStearns@internode.com.au>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: I want to find out who is using a database
Date: Tue, 9 Nov 2010 18:31:48 -0800
Message-ID: <C8FF436C.D070%tsakai@gallo.ucsf.edu> (raw)
In-Reply-To: <68B59BEDCD36854AADBDF17E91B2937A0783A72309@EXCHMAIL.staff.internode.com.au>

Thank you, Sam.

Tena


On 11/9/10 6:25 PM, "Samuel Stearns" <SStearns@internode.com.au> wrote:

Psql template1

Select * from pg_stat_activity;

Sam


From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Tena Sakai
Sent: Wednesday, 10 November 2010 12:48 PM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] I want to find out who is using a database

Hi Everybody,

I want to drop a database and recreate it from a backup file.
But when I issue a dropdb command it wouldn’t let me do
so.  It tells me: database xxxxx is being accessed by other
users.

Can somebody please tell me how I find who it is using the
xxxxx database?

Thank you.

Regards,

Tena Sakai
tsakai@gallo.ucsf.edu

view thread (5+ messages)  latest in thread

Message-ID: <C8FF436C.D070%tsakai@gallo.ucsf.edu>
Permalink:  ../C8FF436C.D070%25tsakai@gallo.ucsf.edu/
Also on:    postgresql.org/message-id/C8FF436C.D070%tsakai@gallo.ucsf.edu

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tsakai@gallo.ucsf.edu, SStearns@internode.com.au
  Subject: Re: I want to find out who is using a database
  In-Reply-To: <C8FF436C.D070%tsakai@gallo.ucsf.edu>

* 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