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 200407210307.i6L37Jb13556@candle.pha.pa.us
Whole thread Raw
In response to Re: logfile subprocess and Fancy File Functions  (Andreas Pflug <pgadmin@pse-consulting.de>)
Responses Re: logfile subprocess and Fancy File Functions
List pgsql-patches
Andreas Pflug wrote:
> Before the thread concentrates too much on a decent default value, I'm
> posting a fresh version of the patch, for some more discussion. Current
> default for pg_logfile_prefix is 'postgresql-', may the committers
> decide which name is The Perfect One.
>
> All previous suggestions have been included, (nb: abstimein is not
> usable, because it ereports(ERROR) on failure; we want to skip wrong
> files gracefully, so I'm using ParseDateTime and DecodeDateTime instead).
>
> I'd still need feedback on pg_dir_ls: should it merely return a setof
> text, or should I enrich it to a record returning all stat data? After
> spending another thought on it, I believe the more sql-like approach is
> to deliver a full-featured record which is selected for the desired
> data, not adding columns with functions.

OK, new idea.  Forget about modifying pg_dir_ls().  Instead add
pg_file_stat the returns the file size, times.  You can then easily use
that for file size and times.  Also, if you want, add an is_dir boolean
so people can write functions that walk the directory tree.

I noticed we had a big logging discussion during 7.4 beta about logging
and log rotation.  This patch is clearly superior to the ideas we had at
that time.

--
  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: Bruce Momjian
Date:
Subject: Re: Patch for pg_dump: Multiple -t options and new -T option
Next
From: Bruce Momjian
Date:
Subject: Re: Patch for pg_dump: Multiple -t options and new -T option