monitoring sql queries

From: "J(dot)V(dot)" <jvsrvcs(at)gmail(dot)com>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: monitoring sql queries
Date: 2011-11-17 16:29:11
Message-ID: 4EC53657.2020300@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am in need of a tool or method to see each/every SQL query that hits
the PostgreSQL database. By query I mean the query in SQL syntax with
all the parameters passed.

What I want to do is:
1) see the query
2) Determine how long the query takes to execute
3) Possibly log both of the above to a log file

Is there any tool internal to PostgreSQL that would allow me to do this?

I cannot monitor it from the code that is actually connecting & sending
the query.

any help or pointers would be greatly appreciated.

J.V.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2011-11-17 16:32:26 Re: monitoring sql queries
Previous Message Tomas Vondra 2011-11-17 16:26:32 Re: synchronous replication + fsync=off?