PostgreSQL & PHP Tutorials - Showing Running Queries

PostgreSQL »  Showing Running Queries
PostgreSQL »  Hints and Tips »  Showing Running Queries

Posted By Chris Smith Posted on 15 Feb 2006, 05:11 PM
Newer versions of PostgreSQL have a 'pg_stat_activity' view to show you who is currently connected to your database system.

By default, this doesn't show you the queries being run.

How do you show that?

Edit your postgresql.conf file and add (or uncomment):

stats_command_string = true

and restart postgresql.


See official documentation for more information.

(This is practically equivalent to the mysql 'show processlist' command).


Avg Rating: 4
Vote Count: 3


              


Want to post a comment? Fill in the details below.

Your Name  : 
Your Email  : 
Your Website  : 
Spam Check! Please answer this question  : 8 + 5 =
Comment