Re: Log rotation

From: Manfred Spraul <manfred(at)colorfullife(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Fernando Nasser <fnasser(at)redhat(dot)com>, Lamar Owen <lowen(at)pari(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Log rotation
Date: 2004-03-14 21:30:15
Message-ID: 4054CEE7.8010906@colorfullife.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:

>Which basically shows one fsync, no O_SYNC's, and setting of the flag
>only for klog reads.
>
>

Which sysklogd do you look at? The version from RedHat 9 contains this
block:

> /*
> * Crack a configuration file line
> */
>
> void cfline(line, f)
> char *line;
> register struct filed *f;
> {
> register char *p;
> [snip]
> if (*p == '-')
> {
> syncfile = 0;
> p++;
> } else
> syncfile = 1;
> [snip]
> if (syncfile)
> f->f_flags |= SYNC_FILE;

And the the fsync depends on SYNC_FILE. As documented in man syslog.conf:

> You may prefix each entry with the minus ``-'' sign to omit
> syncing the
> file after every logging. Note that you might lose
> information if the
> system crashes right behind a write attempt. Nevertheless
> this might
> give you back some performance, especially if you run programs
> that use
> logging in a very verbose manner.

It's sysklogd-1.4.1rh, I'm not sure what part of it are Redhat specific.

--
Manfred

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-03-14 21:44:43 Remaining platform dependencies in float stuff
Previous Message Nicolai Tufar 2004-03-14 21:25:57 Re: PITR: Request for assistance with alpha test plan