Bug 60890
Summary: | log information redirected to /dev/null in the init.d stcript | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Tomas Winkler <tomasw> |
Component: | postgresql | Assignee: | Fernando Nasser <fnasser> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 7.2 | CC: | jean-pierre.matsumoto, jpdalbec, sergio_kessler |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-02-10 18:39:58 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Tomas Winkler
2002-03-08 14:13:00 UTC
Not a bug as such... it's redirected to /dev/null in order to avoid spewing many lines of output when successful. I'll think about how to not throw it away if failing... I agree with tomas, the init script is throwing away *information*, it is up to me if the "many lines of output when successful" are useful for me or not. ideally the log information should be in /var/log/pgsql/pgsql.log and be rotated (like all others daemons) /sergio I don't think four lines of output on startup and three on shutdown constitute "spewing many lines of output". This would really be extremely helpful in debugging intermittent startup problems. I think assigning this a "low" severity is inappropriate. Perhaps I should file a bug report saying "Postgresql sometimes fails to start at boot time. I don't have any details because your init script throws away all the output." I wrote:
> I don't think four lines of output on startup and three on shutdown constitute "spewing many lines of output".
I guess I missed the part about 16 lines of output for every database query. :-(
Still, I think the log information is valuable. I've changed my initscripts and created a logrotate script to keep the output from filling /var.
--- postgresql Mon Jul 29 10:49:44 2002
+++ /etc/init.d/postgresql Mon Jul 29 09:29:07 2002
@@ -125,7 +125,7 @@
#all systems go -- remove any stale lock files
rm -f /tmp/.s.PGSQL.* > /dev/null
echo -n $"Starting postgresql service: "
- su -l postgres -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster start >/dev/null 2>&1" < /dev/null
+ su -l postgres -c "/bin/touch /var/log/pgsql/pgsql.log; /usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster start >>/var/log/pgsql/pgsql.log 2>&1" < /dev/null
sleep 2
pid=`pidof postmaster`
if [ $pid ]
/etc/logrotate.d/postgresql:
/var/log/pgsql/pgsql.log {
weekly
notifempty
missingok
postrotate
/sbin/service postgresql condrestart
endscript
}
drwx------ 2 postgres postgres 4096 Jul 29 09:05 /var/log/pgsql/
This is currently being worked on and will be fixed in an upcoming release. Still in version 9. file (not dir ! ) /var/log/pgsql is touched by RPM postgresql-server but is never used. still in FC2, yeah, TWO years ! happy birthdate bug ! Yes, that is the time we've been asking the PostgreSQL community to provide a way of doing log rotation. Without it the log can crash your system by filling the disk. Please post a note to pgsql-hackers asking for a log rotation mechanism. We have a init script that stores the log in /var/log ready, just waiting for that to become available. This is (at long last) done in PostgreSQL 8.0. |