X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E512E4762C8 for ; Fri, 31 Jan 2003 14:27:08 -0500 (EST) Received: from web14805.mail.yahoo.com (web14805.mail.yahoo.com [216.136.224.221]) by postgresql.org (Postfix) with SMTP id 3EC0D475E52 for ; Fri, 31 Jan 2003 14:27:08 -0500 (EST) Message-ID: <20030131192454.25773.qmail@web14805.mail.yahoo.com> Received: from [66.139.15.154] by web14805.mail.yahoo.com via HTTP; Fri, 31 Jan 2003 11:24:54 PST Date: Fri, 31 Jan 2003 11:24:54 -0800 (PST) From: Mintoo Lall Subject: Re: Postgres server output log To: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1237175156-1044041094=:25095" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/355 X-Sequence-Number: 7197 --0-1237175156-1044041094=:25095 Content-Type: text/plain; charset=us-ascii Thanks guys for the replies.I am using redhat linux 8.0 and postgres 7.2.3. Istarted my postgresql server with the followingcommand after making the changes pg_ctl start -D /usr/local/pgsql/data -o "-i"If I understood correctly the syslog should havecreated a log file at /var/log/postgresql.log but itdidnt do it. I am not sure what is the correct way ofstarting the postgres after making the changes so asto use the syslog and the log rotation script. Anyhelp is appreciated.Thanks,Tarun--- "Rajesh Kumar Mallah." wrote:> > > > This is someones' elses' posting that i have> preserved> shud be useful.> > 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 followin g 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> >-------------------------------------------------------> > > On Thursday 30 January 2003 10:21 am, Mintoo Lall> wrote:> > Hi Everybody,> >> > I am new to postgresql. I started my postgres> using the command> >> > postmaster -D /usr/local/pgsql/data > logfile 2>&1> &> >> > Now after running it for some time I noticed that> the size of this logfile> > has become very large. Is this logfile used to> store any important> > information used by the database for recovery in> case of crash? If no,is> > there any way I can specify a different log file> withouting stopping th e> > server ?> >> > Any help is appreciated.> >> > Thanks,> >> > Tarun> >> >> >> > ---------------------------------> > Do you Yahoo!?> > Yahoo! Mail Plus - Powerful. Affordable. Sign up> now> > -- > > > --------------------------------------------> Regds Mallah> 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.> > __________________________________________________Do you Yahoo!?Yahoo! Mail Plus - Powerful. Affordable. Sign up now.http://mailplus.yahoo.com---------------------------(end of broadcast)---------------------------TIP 4: Don't 'kill -9' the postmaster --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-1237175156-1044041094=:25095 Content-Type: text/html; charset=us-ascii
Thanks guys for the replies.

I am using redhat linux 8.0 and postgres 7.2.3. I
started my postgresql server with the following
command after making the changes 
pg_ctl start -D /usr/local/pgsql/data   -o "-i"

If I understood correctly the syslog should have
created a log file at /var/log/postgresql.log but it
didnt do it. I am not sure what is the correct way of
starting the postgres after making the changes so as
to use the syslog and the log rotation script. Any
help is appreciated.

Thanks,
Tarun


--- "Rajesh Kumar Mallah." <mallah@trade-india.com>
wrote:
> 
> 
> 
> This is someones' elses' posting that i have
> preserved
> shud be useful.
> 
> 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
> 
>
-------------------------------------------------------
> 
> 
> On Thursday 30 January 2003 10:21 am, Mintoo Lall
> wrote:
> > Hi Everybody,
> >
> > I am new to postgresql. I started my postgres
> using the command
> >
> > postmaster -D /usr/local/pgsql/data > logfile 2>&1
> &
> >
> > Now after running it for some time I noticed that
> the size of this logfile
> > has become very large. Is this logfile used to
> store any important
> > information used by the database for recovery in
> case of crash? If no,is
> > there any way I can specify a different log file
> withouting stopping the
> > server ?
> >
> > Any help is appreciated.
> >
> > Thanks,
> >
> > Tarun
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now
> 
> -- 
> 
> 
> --------------------------------------------
>                                 Regds Mallah
> 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.
> 
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-1237175156-1044041094=:25095--