By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,903 Members | 1,086 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,903 IT Pros & Developers. It's quick & easy.

postmaster and logrotate

P: n/a
Hi, everybody!

I was wonderring if there is a way to make logrotate work with postgres
logs?
More precisely, the question is - is there any way to tell a running
postmaster process to reopen its log file?
I tried kill -HUP ... but that doesn't seem to do anything...

Is there just no way to do what I want?

Thanks!

Dima
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Dima Tkach wrote:
Hi, everybody!

I was wonderring if there is a way to make logrotate work with postgres
logs?
More precisely, the question is - is there any way to tell a running
postmaster process to reopen its log file?
I tried kill -HUP ... but that doesn't seem to do anything...

Is there just no way to do what I want?


Docs say pipe into logrotate:

http://developer.postgresql.org/docs...intenance.html

--
Bruce Momjian | http://candle.pha.pa.us
pg***@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #2

P: n/a
Il lun, 2003-12-22 alle 19:40, Dima Tkach ha scritto:
Hi, everybody!

I was wonderring if there is a way to make logrotate work with postgres
logs?
More precisely, the question is - is there any way to tell a running
postmaster process to reopen its log file?
I tried kill -HUP ... but that doesn't seem to do anything...

Is there just no way to do what I want?

Thanks!

Dima


In /etc/logrotate.d create a file named i.e. postgres with more or less
the following contents:

/var/log/postgres.log {
weekly
missingok
rotate 4
copytruncate
compress
delaycompress
notifempty
}

Pls notate the 'copytruncate' option which enables the routing of the
output of syslogd to a new file.

Claudio

--
Claudio Succa
PERTEL - Torino - Italy
+39-011-437.4141
http://www.pertel.it
http://www.uniassist.it

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.