Re: COPYable logs

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

Dave Page wrote:
> 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).
>
>
>

Thanks - I will attend to these items.

There's also something screwy going on - if we have redirect_stderr =
off and log_destination = 'csvlog' then we get tied up in knots and the
postmaster won't die - I had to use kill -9.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-07-23 15:29:00 Re: MAXIMUM_ALIGNOF on Windows-32
Previous Message Magnus Hagander 2007-07-23 15:22:07 Re: Why is lc_messages superuser only?

Browse pgsql-patches by date

  From Date Subject
Next Message Magnus Hagander 2007-07-23 16:59:19 Re: Oops in fe-auth.c
Previous Message Magnus Hagander 2007-07-23 14:36:00 Re: Oops in fe-auth.c