From: | Charles Hornberger <charlie(at)hss(dot)caltech(dot)edu> |
---|---|
To: | Matthew Pinhorn <matthew(dot)pinhorn(at)iona(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Tracing used SQL statments |
Date: | 2003-06-25 18:01:43 |
Message-ID: | 3EF9E387.50502@hss.caltech.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Young | 2003-06-25 19:00:27 | contrib/tsearch - chopped words |
Previous Message | Andrew Perrin | 2003-06-25 17:58:38 | Re: Tracing used SQL statments |