4

I would like to know is there any postgres sql monitoring tool for windows ? The scenario is I would like to see the sql statements that come from the custom web application. Any kind help is appreciated.

1
  • 1
    I've connected Aqua Data Studious to postgres as one of the few 3rd party tools that had some support for it. Unsure if it'll have the features you want and it has a price tag, but it'll resemble a windows tools a bit more for you. Commented Nov 24, 2011 at 19:13

3 Answers 3

8

PostgreSql has a very smart Log system. I use it to monitor queries and recommend it. It is very easy to operate and one can use just notepad to see queries plus the log can be organised by date.

Logs are stored in Installationfolder/data/pg_log folder. While log settings are placed in postgresql.conf file.

Log format is usually set as stderr. But CSV log format is recommended. In order to enable CSV format change in

  • log_destination = 'stderr,csvlog'
  • logging_collector = on

In order to log all queries, very usefull for new installations, set min. execution time of a query that will be logges

  • log_min_duration_statement = 0

In order to view active Queries on your database, use

  • SELECT * FROM pg_stat_activity

To log specific queries set query type

  • log_statement = 'all' # none, ddl, mod, all
Sign up to request clarification or add additional context in comments.

Comments

2

You can use pgFouine to examine the PostgreSQL logs and examine the commands that are being run.

Comments

2

pgBadger is also good log analyzer tool that you can use.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.