Re: logfile subprocess and Fancy File Functions
От | Bruce Momjian |
---|---|
Тема | Re: logfile subprocess and Fancy File Functions |
Дата | |
Msg-id | 200407210307.i6L37Jb13556@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: logfile subprocess and Fancy File Functions (Andreas Pflug <pgadmin@pse-consulting.de>) |
Ответы |
Re: logfile subprocess and Fancy File Functions
|
Список | 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 по дате отправления: