Search Postgresql Archives

Re: Monitoring Postgres - Get the SQL queries which are sent to postgres

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Oct 25, 2006, at 10:11 AM, A. Kretschmer wrote:

Set this in your postgresql.conf:

log_statement = all

Reload the server, and then you can find all your statements in the log.

or, preferably, on a per-connection basis, execute this SQL statement:

set log_min_duration_statement = 0

then only those queries for that connection will be logged. otherwise you get *way* too much stuff to sort out.

Another useful setting which I always enable (in my postgresql.conf file) is

log_min_error_statement = error

so that any statement that generates an error will be appended to the error log entry. otherwise you just see the error notice and have no clue what caused it.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux