Re: [PATCHES] serverlog function (log_destination file)

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 19:05:57
Message-ID: 40CA0295.3030102@pse-consulting.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:

>
>This has got portability issues (fopen("ab"))
>
My doc says b is ignored on ansi systems, and recommends using it. Do
you have other experiences?

> and I don't care for its
>use of malloc in preference to palloc either.
>
Do we already have an applicable memory context in the postmaster at
that early stage of initialization?

>Also, pg_logfile() will dump core if LogFileName returns null.
>
>
How that?

char *filename=LogFileName();
if (filename)
{
...
free(filename);
}

>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.
>
This patch isn't trying to be better on logfile handling than the
default stderr redirection behavior, besides being able to access it
through the postmaster. Seems you insist to name this a toy, many users
don't.

> (The fact that pg_logfile_length
>returns int and not something wider is pretty silly in this connection.)
>
>
2GB logfile seems pretty big...

Regards,
Andreas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message pgsql 2004-06-11 20:19:09 Re: msession for PostgreSQL?
Previous Message Bruce Momjian 2004-06-11 18:25:03 Re: [PATCHES] serverlog function (log_destination file)

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2004-06-11 20:02:11 Re: [PATCHES] pg_ctl using START with paths needing quotes
Previous Message Bruce Momjian 2004-06-11 18:36:40 Re: Fix for erroneous warning on Shutdown