Re: rotatelog / logrotate with PostgreSQL

Поиск
Список
Период
Сортировка
От Roland Roberts
Тема Re: rotatelog / logrotate with PostgreSQL
Дата
Msg-id m2ofanv4hx.fsf@kuiper.rlent.pnet
обсуждение исходный текст
Ответ на Re: rotatelog / logrotate with PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: rotatelog / logrotate with PostgreSQL  (Yury Bokhoncovich <byg@center-f1.ru>)
Re: rotatelog / logrotate with PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

    Tom> "Johnson, Shaunn" <SJohnson6@bcbsm.com> writes:
    >> Can someone send an example of how they have the
    >> logrotate / rotatelog script working with PostgreSQL?

    Tom> Should work to just pipe the postmaster's stderr into it, eg

    Tom>     postmaster ... 2>&1 | logrotate ...  &

Huh?  logrotate moves a log file, it doesn't log anything.

Does the postmaster close the log after writing?  logrotate can move
the log and create a new (empty) one, but if the postmaster has the
log open, it will continue to write to the old one, defeating the
purpose of rotating the log.  Also, if logrotate is configured to
compress the log after rotating, an open connection will result in the
tail of the file being "corrupted" since uncompressed data will be
appended.

So I'm curious too as to how it works; I haven't tried anything at
this point....

roland
--
               PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD                             RL Enterprises
roland@rlenter.com                     76-15 113th Street, Apt 3B
roland@astrofoto.org                       Forest Hills, NY 11375

В списке pgsql-general по дате отправления:

Предыдущее
От: Tourtounis Sotiris
Дата:
Сообщение: Re: Number of disk pages obtained by explain analyze (fwd)
Следующее
От: Roland Roberts
Дата:
Сообщение: Re: OID order = INSERT order?