> [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.
The above query will get you a list of PIDs that are accessing the db.
At the command line, as user postgres, do a kill -2 on those PIDs. DO
NOT kill -9 them.
If you don't find any entries in the pg_stat_activity table, then it may
be the case that you're not monitoring it. In that case, again as user
postgres, do a ps xww to find connections and then kill them as
described previously.
All of the above assumes that you're running on a unix platform.
Drew