Re: COPYable logs

From: Dave Page <dpage(at)postgresql(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: COPYable logs
Date: 2007-07-23 13:29:03
Message-ID: 46A4AD1F.10100@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan wrote:
>
> Here is my latest version of this patch. The good news is that it now
> seems to work on Windows. Please review carefully (esp Magnus, Dave, Tom).

Hi Andrew,

I've eyeballed the code quite thoroughly and given it a whirl under
VC++. The only problem I found was that the assert on line 794 of
syslogger.c in syslogger_parseArgs should be :

Assert(argc == 5);

not

Assert(argc == 6);

I'm not sure I like the file handling however - as it stands we get a
logfile (eg postgresql-2007-07-23_135007.log) which never gets written
to except by any pre-logger startup problems, and a corresponding csv
file. I can see why it's done this way, but it does seem somewhat messy
(I have a bunch of zero byte logfiles for each csv file) - can we clean
that up somehow, perhaps by only creating the initial logfile at startup
if we're not in CSV mode?

I'm also not crazy about the way the csv filename is generated by
appending .csv to the logfilename. This leads to a double file extension
by default which is largely considered to be evil on Windows (it's a
common method for 'hiding' viruses). Perhaps we could replace the .log
with .csv instead of appending it? If the name doesn't end in .log, then
append it (non-default config == users choice).

Regards, Dave.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian G. Pflug 2007-07-23 13:32:00 Re: Full page images in WAL & Cache Invalidation
Previous Message Andrew Dunstan 2007-07-23 13:09:19 Re: SSPI vs MingW

Browse pgsql-patches by date

  From Date Subject
Next Message Magnus Hagander 2007-07-23 13:36:21 Oops in fe-auth.c
Previous Message Pavan Deolasee 2007-07-23 12:19:49 Re: HOT latest patch - version 8