Re: Can't Use DB As Template - accessed by other users error - Mailing list pgsql-novice

From Volkan YAZICI
Subject Re: Can't Use DB As Template - accessed by other users error
Date
Msg-id 7104a7370505031317744d3291@mail.gmail.com
Whole thread Raw
In response to Re: Can't Use DB As Template - accessed by other users error  (<operationsengineer1@yahoo.com>)
Responses Re: Can't Use DB As Template - accessed by other users error  (Andrew Hammond <ahammond@ca.afilias.info>)
List pgsql-novice
Hi,

On 5/3/05, operationsengineer1 <operationsengineer1@yahoo.com> wrote:
> i spent about 30 minutes searching for pg_stat
> information (manual, online, newsgroups) and couldn't
> find out how to use it.  i tried "select pg_stat"
> while logged into my db in psql, but nothing printed
> to the screen.

Himm, Tim seems to be mentioning about pg_stat_activity, not pg_stat:

On 5/3/05, Tim Goodaire <tgoodaire@linux.ca> wrote:
> Take a look at pg_stat_activity for connections to your db database.

On 5/3/05, operationsengineer1 <operationsengineer1@yahoo.com> wrote:
> while i'm at it, i have no clue how to get rid of
> connections, if any are eventually found to be
> present.

[I'm not very sure about this would be the right way to achieve what
you want, but]
List the users, their PIDs and which query they currently on:

=> SELECT procpid, usename, current_query FROM pg_stat_activity;

Check users and their queries. If the "kill [-9] procpid" will be
harmful for that user, just warn him/her. Or try some other
combinations of this messy idea.

Regards.

pgsql-novice by date:

Previous
From: "Celia McInnis"
Date:
Subject: retrieving a previously defined stored procedure from the database?
Next
From: Tom Lane
Date:
Subject: Re: retrieving a previously defined stored procedure from the database?