Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 64FAF47599C for ; Mon, 27 May 2002 08:55:50 -0400 (EDT) Received: from mail-relay.trade-india.com (mail-relay.trade-india.com [203.196.129.235]) by postgresql.org (Postfix) with SMTP id A5DF047595A for ; Mon, 27 May 2002 08:55:40 -0400 (EDT) Received: (qmail 18931 invoked from network); 27 May 2002 12:49:16 -0000 Received: from system29.trade-india-local.com (HELO server) (192.168.0.29) by ptil-236-129-del.primus-india.net with SMTP; 27 May 2002 12:49:16 -0000 Content-Type: text/plain; charset="iso-8859-1" From: "Rajesh Kumar Mallah." Organization: Infocom Network Limited. To: Ferdinand Smit , pgsql-admin@postgresql.org Subject: Re: How to rotate postgres logfiles Date: Mon, 27 May 2002 18:25:42 +0530 X-Mailer: KMail [version 1.4] References: <200205271350.20631.ferdinand@telegraafnet.nl> In-Reply-To: <200205271350.20631.ferdinand@telegraafnet.nl> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200205271825.42610.mallah@trade-india.com> X-Archive-Number: 200205/227 X-Sequence-Number: 4402 Hi , This question has been asked before in the list by me.=20 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 =3D 2 syslog_facility =3D 'LOCAL0' syslog_ident =3D '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=3D10000k 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 #include 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 --=20 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.