Thursday, October 11, 2007

pg_stat_activity is your friend

PgAdmin for postgres has a nice feature called "Server status". It is great if you sit in front of a GUI.
But if you want to do some remote work or tell a customer to report that server status, it is not quite the right thing.

But at the end, pgAdmin is only doing

select * from pg_stat_activity order by procpid;

This will show you all client connections together with the command they are currently executing.

1 comment:

Francesco said...

I little question for you.....

And for delete a Connection with some command in psql prompt???

for example, may be that some connection remains uncolsed for some crash or so on...

It is possible to close a connection suspended????

Can I remove a connection deletes it from that table without using pgAdmin???

Thank you for your help.....