pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to rotate postgres logfiles
2+ messages / 2 participants
[nested] [flat]
* How to rotate postgres logfiles
@ 2002-05-27 11:50 Ferdinand Smit <ferdinand@telegraafnet.nl>
2002-05-27 12:55 ` Re: How to rotate postgres logfiles Rajesh Kumar Mallah. <mallah@trade-india.com>
0 siblings, 1 reply; 2+ messages in thread
From: Ferdinand Smit @ 2002-05-27 11:50 UTC (permalink / raw)
To: pgsql-admin
Hi,
Does anyone know how to flush the logfiles op postgres. I need it for
logrotate.
'/usr/lib/postgresql/bin/pg_ctl reload' does not work, it does not create a
new logfile.
Regards,
Ferdinand
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: How to rotate postgres logfiles
2002-05-27 11:50 How to rotate postgres logfiles Ferdinand Smit <ferdinand@telegraafnet.nl>
@ 2002-05-27 12:55 ` Rajesh Kumar Mallah. <mallah@trade-india.com>
0 siblings, 0 replies; 2+ messages in thread
From: Rajesh Kumar Mallah. @ 2002-05-27 12:55 UTC (permalink / raw)
To: Ferdinand Smit <ferdinand@telegraafnet.nl>; pgsql-admin
Hi ,
This question has been asked before in the list
by me.
and below is an workable solution provided by Gaetano
regds
mallah.
---------------------------------------------
Well,
the most correct way to do a logrotate is ( Redhat ):
1) Put on your postgresql.conf the following lines:
syslog = 2
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'
2) Put on the directory /etc/logrotate.d a file called
'postgres' with the following lines:
/var/log/postgresql.log {
compress
rotate 2
size=10000k
errors mendola@bigfoot.com
create 0664 postgres postgres
daily
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
change the email address of course :-)
3) Put the following line on your /etc/syslog.conf
# Save postgresql logs
LOCAL0.*
/var/log/postgresql.log
Ciao
Gaetano
--
#exclude <windows>
#include <CSRSS>
printf("\t\t\b\b\b\b\b\b");.
printf("\t\t\b\b\b\b\b\b");
On Monday 27 May 2002 05:20 pm, Ferdinand Smit wrote:
> Hi,
>
> Does anyone know how to flush the logfiles op postgres. I need it for
> logrotate.
> '/usr/lib/postgresql/bin/pg_ctl reload' does not work, it does not create a
> new logfile.
>
> Regards,
> Ferdinand
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)
Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-05-27 12:55 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-05-27 11:50 How to rotate postgres logfiles Ferdinand Smit <ferdinand@telegraafnet.nl>
2002-05-27 12:55 ` Rajesh Kumar Mallah. <mallah@trade-india.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox