Re: logfile subprocess and Fancy File Functions

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, 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-21 00:55:43
Message-ID: 200407210055.i6L0thw27895@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Andreas Pflug wrote:
> Peter Eisentraut wrote:
> > Bruce Momjian wrote:
> >
> >>For logs I think pgsql_ is best because that filename is already
> >>going to be long, and I don't usually like dashes in file names.
> >>They look too much like arguments, but tarballs use them and it looks
> >>OK there, I guess.
> >
> >
> > I wasn't talking about what looks best, I was talking about current
> > practice for log files. From that you might be able to extrapolate
> > what other people have previously found to look best.
> >
> > In any case, we're not using DOS and 12 inch monitors any more. File
> > names can be as long as we want.
> >
>
> 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.

Now that I look at it, you could remove pg_file_length() and allow
pg_dir_ls to show you the file sizes. The only problem is that the
length is needed for the read API so you would need to use a WHERE
clause to pick the file where you want the size, rather than just pass
the file name.

--
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

Browse pgsql-patches by date

  From Date Subject
Next Message Christopher Kings-Lynne 2004-07-21 01:27:02 Re: Patch for pg_dump: Multiple -t options and new -T option
Previous Message Mark Kirkwood 2004-07-20 23:17:31 Re: win32 readline