Re: Postgres server output logfile - Mailing list pgsql-general

From Tom Lane
Subject Re: Postgres server output logfile
Date
Msg-id 12163.1043902854@sss.pgh.pa.us
Whole thread Raw
In response to Postgres server output logfile  (Mintoo Lall <tlqmail@yahoo.com>)
Responses Re: Postgres server output logfile
List pgsql-general
Mintoo Lall <tlqmail@yahoo.com> writes:
> 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?

No, it's only messages for human consumption.

> If no,is there any way I can specify a different log file
> withouting stopping the server ?

Unfortunately not.  The recommended procedure for production servers is
not to send the postmaster's stdout/stderr directly to a disk file, but
to pipe it into some script that rotates the output.  There's a usable
script in the Apache distribution, or you can roll your own with little
effort.  See the PG admin guide for more discussion (in the routine-
maintenance chapter).

            regards, tom lane

pgsql-general by date:

Previous
From: Justin Clift
Date:
Subject: Re: Website troubles
Next
From: Justin Clift
Date:
Subject: Re: Using RSYNC for replication?