Set
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).
See
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=runtime-config.html#LOGGING
for details.
-Charlie
Matthew Pinhorn wrote:
> Hello,
>
> 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.
>
> Thanks
>
> Matthew
>
--
Charles Hornberger
Caltech
Division of the Humanities and Social Sciences
M/C 228-77
Tel (626) 395-3474