Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Is there an easy way to monitor Postgres db queries in a (Windows XP) environment. I'm testing some new code and suspect that in some cases queries are being duplicated/repeated under certain conditions.

What is the easiest/best way to do this - I just need something simple - basically the timestamp and syntax of the query.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Just add the following line into the config file:

log_min_duration_statement = 0  

After a restart your logfile contains all statements.

share|improve this answer
4  
A restart is not necessary. pg_ctl reload should be sufficient –  a_horse_with_no_name Apr 13 '11 at 8:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.