Skip site navigation (1) Skip section navigation (2)

RE: log file?

From: "Tamsin" <tg_mail(at)bryncadfan(dot)co(dot)uk>
To: <pgsql-novice(at)postgresql(dot)org>
Cc: <danb(at)cyclonecomputers(dot)com>
Subject: RE: log file?
Date: 2001-01-16 15:59:21
Message-ID: NEBBKHBOBMJCHDMGKCNJOEGHCIAA.tg_mail@bryncadfan.co.uk (view raw or flat)
Thread:
Lists: pgsql-novice
Hi,

This is what I do to get all queries in a log file:

1.  create a file called pg_options in your postgres home directory. In this
file, enter the word "query".  Nothing else (if you look at the docs, there
are other things you can put in here).

2.  Find out where stdout/stderr are going from postgres.  This depends on
how you are starting postgres.  I start my postmaster with the line:

/usr/bin/pg_ctl  -D $PGDATA -p /usr/bin/postmaster start >
~postgres/logs/postmaster.log 2>&1

so my log file is ~postgres/logs/postmaster.log and contains all the
queries.

Hope this helps!

Tamsin


> -----Original Message-----
> From: pgsql-novice-owner(at)postgresql(dot)org
> [mailto:pgsql-novice-owner(at)postgresql(dot)org]On Behalf Of Dan B
> Sent: 15 January 2001 07:37
> To: pgsql-novice(at)postgresql(dot)org
> Cc: danb(at)cyclonecomputers(dot)com
> Subject: [NOVICE] log file?
>
>
> I'm sorry about asking this here, since I'm sure it is a FAQ.
>
> I'm using an ecommerce app (interchange) and it's giving me some database
> errors (unterminated quoted string, blah blah).  I would like to see the
> SQL code as it is being executed (or given) to postgresql.  Since my app
> doesn't have a log that tells exactly what it is saying to postgresql, I
> assume postgresql has this kind of logging capability.  (I was
> thinking of
> a file that I could just 'tail -f'.)  It would really help me
> debug my app.
>
> Thanks.
>
>
> Dan Browning, Cyclone Computer Systems, danb(at)cyclonecomputers(dot)com
>
>


In response to

  • log file? at 2001-01-15 07:36:56 from Dan B

pgsql-novice by date

Next:From: Nabil SayeghDate: 2001-01-16 16:18:43
Subject: LIKE optimization
Previous:From: Ken CoreyDate: 2001-01-16 15:44:39
Subject: Re: Yikes! Bitten by line length?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group