I started postgres with:
$PGHOME/bin/postmaster -D /pg/pg747/data -p 5432 -i > /pg2/pg747/logs/db_
log 2>&1 &
so my log goes to db_log
now tried rotate log by logrotate by
/pg/pg747/logs/db_log{
daily
rotate 60
copytruncate
delaycompress
compress
notifempty
# create 600 postgres postgres
}
It is rotating log fine but there some strings I can when I do vi db_log
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^ERROR: relation "users" does not exist
FATAL: database "ER" does not exist
Only the first rotated does not show this stings. Any idea how I can fix this problem. My lifekeeper
starts postgres so I don't have any option to start by pipe. So I can not pipe to rotatelog.
Anyone has any idea how I can logrotate once I start postgres and it starts putting all log to one
file.