Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 401D5650E93 for ; Fri, 4 Jul 2008 10:50:54 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 57408-06 for ; Fri, 4 Jul 2008 10:50:42 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from n5b.bullet.mail.ac4.yahoo.com (n5b.bullet.mail.ac4.yahoo.com [76.13.13.75]) by postgresql.org (Postfix) with SMTP id E208C64FD64 for ; Fri, 4 Jul 2008 10:50:47 -0300 (ADT) Received: from [76.13.13.26] by n5.bullet.mail.ac4.yahoo.com with NNFMP; 04 Jul 2008 05:44:15 -0000 Received: from [76.13.10.183] by t3.bullet.mail.ac4.yahoo.com with NNFMP; 04 Jul 2008 13:50:45 -0000 Received: from [127.0.0.1] by omp124.mail.ac4.yahoo.com with NNFMP; 04 Jul 2008 13:50:45 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 942099.20392.bm@omp124.mail.ac4.yahoo.com Received: (qmail 39726 invoked by uid 60001); 4 Jul 2008 13:50:44 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=hH6UKsvRnqEEE7lTVGSd8D46c15xku+KNsx+SMCep9VYD1NB6Ww0KHm9Bso0kPhq6Tj41SN5Hw7i+3NZn8NOVEzN1FfGqt2LnyXSpupI9awWaeJztcajcv9L5TAxo5fnv3qHprL+3tt46IAh9DGrVqcWDJUlZMN+co+hSTAmm5Y=; Received: from [209.88.228.11] by web59510.mail.ac4.yahoo.com via HTTP; Fri, 04 Jul 2008 06:50:43 PDT X-Mailer: YahooMailWebService/0.7.199 Date: Fri, 4 Jul 2008 06:50:43 -0700 (PDT) From: Lennin Caro Reply-To: lennin.caro@yahoo.com Subject: Re: Who's attached to the database? To: Kevin Grittner , Carol Walter Cc: pgsql-admin@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <902696.39596.qm@web59510.mail.ac4.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.2 tagged_above=0 required=5 tests=AWL=0.012, RCVD_IN_BL_SPAMCOP_NET=2.188 X-Spam-Level: ** X-Archive-Number: 200807/66 X-Sequence-Number: 29676 try this select pg_cancel_backend(); if the command not work kill the process in os kill -9 proccessid_os --- On Thu, 7/3/08, Carol Walter wrote: > From: Carol Walter > Subject: Re: [ADMIN] Who's attached to the database? > To: "Kevin Grittner" > Cc: pgsql-admin@postgresql.org > Date: Thursday, July 3, 2008, 8:07 PM > 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 > 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 > > > -- > Sent via pgsql-admin mailing list > (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin