What queries are running on my PostgreSQL database?

1145945 pts.
Tags:
Database
PostgreSQL
I'm running a PostgreSQL database and one of my applications runs queries on it. Is there a way I can see which queries are running on it? The computer I'm running it on is a Linux.
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Elizine

    Storing of query strings is usually disabled in PostgreSQL by default.  To enable it, use this line in your postgresql.conf

    stats_command_string = true

    This setting can be changed on a running database without restarting or effecting open connections by telling the PostgreSQL parent process, postmaster, to reload its config.  Send it a SIGHUP or use the safer pg_ctl command with the reload option.  Example:

    pg_ctl reload
    1,145 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: