Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] serverlog function (log_destination file)

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(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-19 03:04:47
Message-ID: 200406190304.i5J34lO15851@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Were are we on this?

---------------------------------------------------------------------------

Andreas Pflug wrote:
> 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
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faqs/FAQ.html
> 

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

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2004-06-19 03:05:29
Subject: Re: More vacuum.c refactoring
Previous:From: Bruce MomjianDate: 2004-06-19 02:20:57
Subject: Re: Tablespace patch review

pgsql-patches by date

Next:From: Bruce MomjianDate: 2004-06-19 03:11:48
Subject: Re: stderr & win32 admin check
Previous:From: Bruce MomjianDate: 2004-06-19 02:20:57
Subject: Re: Tablespace patch review

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group