From: | Andreas Pflug <pgadmin(at)pse-consulting(dot)de> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: logfile subprocess and Fancy File Functions |
Date: | 2004-07-20 13:26:03 |
Message-ID: | 40FD1D6B.8090405@pse-consulting.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Bruce Momjian wrote:
> Andreas Pflug wrote:
>
>>
>
> Very nice. You did a nice trick of reading the log filenames into a
> timestamp field:
>
> count = sscanf(de->d_name, "%04d-%02d-%02d_%02d%02d%02d_%05d.log", &yea$
>
> You only process files that match that pattern for pg_logfiles_ls()
> (perhaps this should be pg_logdir_ls for consistency).
Yup.
And you can then
> 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).
>
> 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_ ?
>
> 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.
Regards,
Andreas
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-07-20 14:00:35 | Re: PITR COPY Failure (was Point in Time Recovery) |
Previous Message | Simon Riggs | 2004-07-20 13:11:27 | Re: PITR COPY Failure (was Point in Time Recovery) |