Thread: How to monitor postmaster to find a trouble query?

How to monitor postmaster to find a trouble query?

From
"lt"
Date:
Hi,
    I am running a productive server of postgresql 7.03, but sometimes it have a high load average value more than 10,
itmust be caused by a trouble query, although I have carefully checked my queries, I still can not find which query
madethis. I wish there is a way to monitor the query, for example, when I use 'top' find a postgres process take more
than50% CPU, I can check which query is executed in it. I have tried add query=4 in pq_options file, but nothing
recordedin syslog.  


Re: How to monitor postmaster to find a trouble query?

From
Tom Lane
Date:
"lt" <ltshadow@basecity.com> writes:
>     I have tried add query=4 in pq_options file,
>     but nothing recorded in syslog.

Are you starting the postmaster with -S ?  That suppresses its log...

            regards, tom lane