Re: logfile subprocess and Fancy File Functions - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: logfile subprocess and Fancy File Functions
Date
Msg-id 200407201434.i6KEYKO19115@candle.pha.pa.us
Whole thread Raw
In response to Re: logfile subprocess and Fancy File Functions  (Andreas Pflug <pgadmin@pse-consulting.de>)
List pgsql-patches
Andreas Pflug wrote:
> > process the timestamp field in queries.  Good idea.  What happens if a
> > filename matches the above pattern but isn't a valid timestamp?  Does
> > the function fail?
>
> Right now, BuildTupleFromCString will fail for invalid timestamps.
>
> I'm going to change that to pgsql's internal function (strptime seems a
> bad idea though).

Tom used abstimein() in xlog.c.

> > My only question is whether we need to allow a custom prefix for the
> > log filenames so they can be distinguished from other file names in a
> > user-supplied log directory, like /var/log, or would they always go into
> > a separate directory under there.  I think a prefix would be nice.
>
> How should the prefix be named? pgsql_ ?

I would default to that, yes, but allow the user to set it via GUC
variable.  You want to hard-code the time part of the file name so you
can load it into a timestamp, but we should give users control over a
prefix just in case they mix the files in a directory with log files
from other applications.

> > Of course this needs docs but I assume you are waiting to see it applied
> > first.
>
> Not necessarily, but I'd like names etc. fixed before.

Sure.

--
  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: Andreas Pflug
Date:
Subject: Re: logfile subprocess and Fancy File Functions
Next
From: Bruce Momjian
Date:
Subject: Re: Patch for pg_dump: Multiple -t options and new -T option