>>>>> "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