Re: [PATCHES] serverlog function (log_destination file)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>, andrew(at)dunslane(dot)net
Subject: Re: [PATCHES] serverlog function (log_destination file)
Date: 2004-06-11 18:20:26
Message-ID: 17048.1086978026@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andreas Pflug <pgadmin(at)pse-consulting(dot)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 ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-06-11 18:22:16 Re: [PATCHES] Configuration patch
Previous Message Bruce Momjian 2004-06-11 18:17:25 Re: [pgsql-hackers-win32] [PATCHES] Compiling libpq with VisualC

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-06-11 18:22:16 Re: [PATCHES] Configuration patch
Previous Message Bruce Momjian 2004-06-11 18:17:25 Re: [pgsql-hackers-win32] [PATCHES] Compiling libpq with VisualC