Re: Log rotation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Log rotation
Дата
Msg-id 24126.1079292121@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Log rotation  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Log rotation  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Log rotation
Следующее
От: jseymour@LinxNet.com (Jim Seymour)
Дата:
Сообщение: Patch for: 7.4.2 build broken on Solaris 7 and 8 with --enable-thread-safety