postgres logging Re: [Zope] GUF & SQL login problems

Andreas Heckel andreas@easyleading.org
Mon, 03 Sep 2001 23:52:21 +0200


Milos Prudek wrote:
> 
> > > > can't you just get your SQL-backend to log/print out the SQL-queries it
> > > > gets from your GUF? This is what once helped me to figure out a similar
> > > > problem with loginmanager.
> > >Is it possible with PostgresQL?
> > Check out the -d switch to postgres and postmaster.
> 
> Okay, I changed postmaster.opts to include d=2, and I verified using
> "pg_ctl status" that it applies. Now where is the log file? The queries
> do not go to syslog...
> 
> There is a file that looks like a log: /var/lib/pgsql/data/pg_log. It is
> growing, but when I start psql and do "SELECT * from pg_log", I get
> "ERROR: pg_log cannot be accessed by users"...

Have a look at your postgres init skript.
On my system the log file is /var/log/postgresql.log

#! /bin/sh
...
H=/usr/local/pgsql/bin/postmaster
LOGFILE=/var/log/postgresql.log
DATADIR=/var/lib/pgsql/data
...
su - postgres -c "/sbin/startproc -l $LOGFILE $H -o -e -i -d3 -o -F
-D$DATADIR"
...

-- 
_______________________________________________________________________
Andreas Heckel                                  andreas@easyleading.org
LINUX is like a wigwam...no gates...no windows and an apache inside ;-)