Re: Log rotation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: 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 19:22:01
Message-ID: 24126.1079292121@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Seymour 2004-03-14 20:06:59 Patch for: 7.4.2 build broken on Solaris 7 and 8 with --enable-thread-safety
Previous Message Bruce Momjian 2004-03-14 19:09:49 Re: Log rotation