lograte after you start postgres

From: "Nasir Ahmed" <nahmed(at)ebates(dot)com>
To: <pgadmin-hackers(at)postgresql(dot)org>
Subject: lograte after you start postgres
Date: 2006-03-05 19:18:26
Message-ID: F93D08A809C46B4A966D3DCF662B9B6802A0415B@exchange2.corp.ebates.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

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
^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@
^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@
^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@
^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@
^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^@^(at)^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.

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2006-03-05 21:25:45 Re: 1.4.2?
Previous Message Raphaël Enrici 2006-03-04 22:26:59 Re: 1.4.2?