Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 27F0A4774A1 for ; Thu, 30 Jan 2003 09:07:37 -0500 (EST) Received: from rtlocal.trade-india.com (mail-relay.trade-india.com [203.196.129.235]) by postgresql.org (Postfix) with SMTP id 2C2EC475AAC for ; Thu, 30 Jan 2003 09:07:33 -0500 (EST) Received: (qmail 22271 invoked from network); 30 Jan 2003 14:03:55 -0000 Received: from unknown (HELO system67.trade-india-local.com) (192.168.0.67) by infocom-236-129-del.trade-india.com with SMTP; 30 Jan 2003 14:03:55 -0000 From: "Rajesh Kumar Mallah." Organization: Infocom Network Limited. To: Oliver Elphick , "Gaetano Mendola" Subject: Re: Postgres server output log Date: Thu, 30 Jan 2003 19:42:51 +0530 User-Agent: KMail/1.5 Cc: Mintoo Lall , pgsql-admin@postgresql.org References: <20030130045105.28846.qmail@web14806.mail.yahoo.com> <200301301052.36984.mallah@trade-india.com> <1043930409.1112.203.camel@linda.lfix.co.uk> In-Reply-To: <1043930409.1112.203.camel@linda.lfix.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200301301942.51018.mallah@trade-india.com> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/337 X-Sequence-Number: 7179 Hmm.. thank you for pointing out!. i have marked a Cc to Gaetano Mendola [ the original sinner ;-) ] regds mallah. On Thursday 30 January 2003 06:10 pm, Oliver Elphick wrote: > On Thu, 2003-01-30 at 05:22, Rajesh Kumar Mallah. wrote: > > This is someones' elses' posting that i have preserved > > shud be useful. > > ... > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~` > > > > Well, > > the most correct way to do a logrotate is ( Redhat ): > > ... > > > 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 > > } > > ... > > This won't work as it stands with PostgreSQL, because the hangup signal > does not make the postmaster reopen the log file. Instead of that > postrotate section, you need to use logrotate's copytruncate option, > which will copy the logfile to another file before zeroing the logfile. > > Depending on what is being logged, you may want to change the > permissions to 660; there may be stuff in the logs that you don't want > to reveal to the world. (With copytruncate, I think the create option > applies to the copy files rather than to the original logfile.) -- Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)26152172 (221) (L) 9811255597 (M) Visit http://www.trade-india.com , India's Leading B2B eMarketplace.