Skip site navigation (1) Skip section navigation (2)

Re: Who's attached to the database?

From: Carol Walter <walterc(at)indiana(dot)edu>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Who's attached to the database?
Date: 2008-07-03 20:07:23
Message-ID: DCE58E12-256E-4707-A8E8-3B33FB286D09@indiana.edu (view raw or flat)
Thread:
Lists: pgsql-admin
Thanks, guys,

This told me that the user that has it open is the interface user  
called db_user.  Is there a command to disconnect this user?

Carol

On Jul 3, 2008, at 3:53 PM, Kevin Grittner wrote:

>>>> Carol Walter <walterc(at)indiana(dot)edu> wrote:
>> I'm trying to drop a database and I'm getting an error that says that
>
>> the database is being accessed by other users.  Is there a way I can
>
>> find out who these users are or if there really is a user accessing
> it?
>
> select * from pg_stat_activity where datname = 'yourdb';
>
> -Kevin


In response to

Responses

pgsql-admin by date

Next:From: Bricklen AndersonDate: 2008-07-03 21:17:30
Subject: Re: Who's attached to the database?
Previous:From: paul sochaDate: 2008-07-03 19:55:41
Subject: Re: Who's attached to the database?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group