Lists: | pgsql-patches |
---|
From: | Andrew Sullivan <andrew(at)libertyrms(dot)info> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | pglog-rotator |
Date: | 2003-04-04 02:10:39 |
Message-ID: | 20030404021039.GE20124@libertyrms.info |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
Attached is the pglog-rotator file.
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M2P 2A8
+1 416 646 3304 x110
Attachment | Content-Type | Size |
---|---|---|
pglog-rotator | text/plain | 2.9 KB |
From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Andrew Sullivan <andrew(at)libertyrms(dot)info> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: pglog-rotator |
Date: | 2003-04-04 02:57:22 |
Message-ID: | 20030404025722.GC7479@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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)