Re: [HACKERS] serverlog function (log_destination file) - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: [HACKERS] serverlog function (log_destination file)
Date
Msg-id 200406111825.i5BIP3Q24767@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] serverlog function (log_destination file)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> Andreas Pflug <pgadmin@pse-consulting.de> writes:
> > The attached patch has the default filename issue fixed, and
> > documentation. Since I don't have a doc build system functional, there
> > might be tag mismatches or other typos; please check. IMHO this should
> > be committed without waiting for log rotation stuff.
>
> This has got portability issues (fopen("ab")) and I don't care for its
> use of malloc in preference to palloc either.  Also, pg_logfile() will
> dump core if LogFileName returns null.
>
> The bigger issue though is whether this is useful at all, if you cannot
> solve the file rotation issue (and I don't think you can).  As
> implemented, the secondary log file cannot be truncated without
> restarting the postmaster.  I think that reduces it from a possibly
> useful feature to a useless toy.  (The fact that pg_logfile_length
> returns int and not something wider is pretty silly in this connection.)
>
> My vote is not to apply until and unless something that can rotate the
> logfile is demonstrated ...

Agreed.  Lets see where it goes.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] serverlog function (log_destination file)
Next
From: Tom Lane
Date:
Subject: Re: Fix for erroneous warning on Shutdown