Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44468 - Init-scripts for PostgreSQL that use syslog
Summary: Init-scripts for PostgreSQL that use syslog
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
: 157212 159769 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-03-12 09:55 UTC by Arthur Ward
Modified: 2010-03-16 22:53 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
syslog-enabled postgresql.init-7.4.2 (postgresql.init-7.4.2,1.33 KB, text/plain)
2004-03-12 09:58 UTC, Arthur Ward
Details
syslog-enabled pg_autovacuum.init-7.4.2 (pg_autovacuum.init-7.4.2,1.10 KB, text/plain)
2004-03-12 09:59 UTC, Arthur Ward
Details

Note You need to log in before you can comment on or make changes to this bug.
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.