Re: pglog-rotator

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pglog-rotator
Дата
Msg-id 20030404025722.GC7479@dcc.uchile.cl
обсуждение исходный текст
Ответ на pglog-rotator  (Andrew Sullivan <andrew@libertyrms.info>)
Список pgsql-patches
On Thu, Apr 03, 2003 at 09:10:39PM -0500, Andrew Sullivan wrote:

Nice little program!  Thank you.


>     ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat($err_log_file);

FWIW, if you are only going to use the filesize, this can be written as
    $size = (stat($err_log_file))[7];


>         open(LOG, ">>$err_log_file");

And this should probably be
        open(LOG, ">>$err_log_file") or die "$err_log_file: $!";

or some other way of checking that the output file was really opened.


--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Uno combate cuando es necesario... ¡no cuando está de humor!
El humor es para el ganado, o para hacer el amor, o para tocar el
baliset.  No para combatir."  (Gurney Halleck)


В списке pgsql-patches по дате отправления:

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: pglog-rotator
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Win32 path patch