Re: Log rotation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Log rotation
Date
Msg-id 24126.1079292121@sss.pgh.pa.us
Whole thread Raw
In response to Re: Log rotation  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Log rotation
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I wonder if this fsync for PostgreSQL messages is some change made to
> Linux syslog.

You're missing the point: by default syslog fsyncs *all* messages.
You can turn this off on a per-output-file basis by putting "-" on the
desired lines of the syslog config file.  It has nothing whatever to do
with Postgres.

The fact that you don't see any fsync calls doesn't prove anything.  How
about O_SYNC or O_DSYNC flags when opening the output files?  That would
be the natural way to implement it given the spec.

strace'ing syslogd on my HPUX box shows that it doesn't issue explicit
fsync calls either, but I don't know of any way to tell whether it's got
the log files opened O_SYNC.

BTW the Linux man page says specifically that their syslogd tries to be
compatible with BSD.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Log rotation
Next
From: jseymour@LinxNet.com (Jim Seymour)
Date:
Subject: Patch for: 7.4.2 build broken on Solaris 7 and 8 with --enable-thread-safety