From: | Madison Kelly <linux(at)alteeve(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Michael Fuhr <mike(at)fuhr(dot)org>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Logging question |
Date: | 2005-01-18 05:32:13 |
Message-ID: | 41EC9F5D.1030007@alteeve.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane wrote:
> Madison Kelly <linux(at)alteeve(dot)com> writes:
>
>>Where /is/ the log file?
>
>
> It depends. If you selected syslog logging then it's wherever syslog is
> configured to put the messages. Otherwise, it's wherever the
> postmaster's stderr output is being sent.
>
> A fairly annoying property of the current RPM packagings is that their
> startup script sends postmaster stderr to /dev/null. We have (finally)
> fixed that for 8.0, but in current releases you need to alter the
> startup script in order to get useful log output.
>
> regards, tom lane
woohoo!!
Thank you, I would have taken forever to figure that out on my own...
For the record on Fedora Core 1 the line to change is:
'/etc/rc.d/rc3.d/s85postgresql' line 171
Which I changed from:
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p
/usr/bin/postmaster -o '-p ${PGPORT}' start > /dev/null 2>&1" < $
to...
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p
/usr/bin/postmaster -o '-p ${PGPORT}' start > /var/log/psql.log $#
I had to touch the 'psql.log' file and then 'chown' it to
'postgres:postgres' but now my queries are being logged. Adding the earlier:
ALTER USER johndoe SET log_statement TO TRUE;
that Michael Fuhr mentioned and I have exactly what I wanted happening.
Thank you all -very- much!
Madison
From | Date | Subject | |
---|---|---|---|
Next Message | Hong Yuan | 2005-01-18 06:06:32 | Re: Multiline plpython procedure |
Previous Message | Michael Glaesemann | 2005-01-18 05:24:18 | Re: Logging question |