log_statement = true
in your postgresql.conf file, then stop & restart the postmaster.
Queries will be printed in the postmaster's output (or via syslog, if
you're using that).
Matthew Pinhorn wrote:
> I am wondering if somebody can help me. I want to know if there is a
> way that I can make some kind of a log file of all of the SQL statements that
> are used in my database. It was suggested to make that I could make a trace
> of them and I am not sure how to do that.
> I have inherited a database from a former co-worker and now I am
> starting to get crashes. The crashes has SET TRANSACTION ISOLATION LEVEL
> messages in the log file. So I think that there is a lock on the database.
> And if I can see the queries that are causing the crash I might be able
> to fix the problem.
Division of the Humanities and Social Sciences
Tel (626) 395-3474
In response to
pgsql-admin by date
|Next:||From: Bruce Young||Date: 2003-06-25 19:00:27|
|Subject: contrib/tsearch - chopped words|
|Previous:||From: Andrew Perrin||Date: 2003-06-25 17:58:38|
|Subject: Re: Tracing used SQL statments|