Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 44468

Summary: Init-scripts for PostgreSQL that use syslog
Product: Gentoo Linux Reporter: Arthur Ward <award>
Component: New packagesAssignee: PgSQL Bugs <pgsql-bugs>
Status: RESOLVED FIXED    
Severity: enhancement CC: codermattie, esigra, newt0311
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: syslog-enabled postgresql.init-7.4.2
syslog-enabled pg_autovacuum.init-7.4.2

Description Arthur Ward 2004-03-12 09:55:02 UTC
PostgreSQL and pg_autovacuum do not have support for log rotation, so you have to use some kind of external helper to take care of this. (Apache has one, and there's also multilog in daemontools.) I modified my initscripts to use the logger tool from util-linux, so logging data from PostgreSQL and pg_autovacuum goes to syslog.

Those familiar with PostgreSQL may want to point out that PG has syslog support internally. However, the PG developers don't recommend it for reliability. I've also had bad experiences with it personally - some kind of weird glibc-PG signal race condition that a PG dev couldn't find, and I got tired of hacking on it. Using logger works around any glibc weirdness by moving the syslogging out of PG, so glibc doesn't have a chance to get confused. None of this matters to pg_autovacuum though; it doesn't have syslog support at all.

The only other changes are that the log file settings in the conf.d files are unnecessary. If someone thinks keeping the unrotated logfile option around is a good idea, at the very least we should have a toggle to choose syslog or files.
Comment 1 Arthur Ward 2004-03-12 09:58:46 UTC
Created attachment 27251 [details]
syslog-enabled postgresql.init-7.4.2
Comment 2 Arthur Ward 2004-03-12 09:59:21 UTC
Created attachment 27252 [details]
syslog-enabled pg_autovacuum.init-7.4.2
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-12-05 11:53:24 UTC
*** Bug 157212 has been marked as a duplicate of this bug. ***
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-01-02 14:00:39 UTC
*** Bug 159769 has been marked as a duplicate of this bug. ***
Comment 5 Patrick Lauer gentoo-dev 2010-03-16 22:53:41 UTC
Fixed upstream. Syslog support properly fixed by 7.4.4, and we're on 7.4.26/27/28 now.