Re: Win32 Event log

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "PostgreSQL Patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Win32 Event log
Date: 2004-08-12 15:07:29
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E41A76F4@ratbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32 pgsql-patches

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: 12 August 2004 15:40
> To: Dave Page
> Cc: PostgreSQL Patches
> Subject: Re: [PATCHES] Win32 Event log
>
> "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> writes:
> > The attached patch directs FATAL and PANIC elog's to the
> event log as
> > well as their normal destination.
>
> I don't think this is a good idea. In the first place, FATAL
> errors are not necessarily serious or out-of-the-ordinary ---
> an example is that all authorization errors are FATAL.

OK, I could live with just panics.

> In
> the second place, the proposed patch deliberately subverts
> what the DBA has set as the logging output parameters. I
> dislike software that knows better than I do what I want and
> is willing to ignore what I told it to do on those grounds.

Logging like this is fairly normal on Windows. Applications may maintain
their own (often verbose) logfiles, however more serious errors get
directed to the event log as well. This allows automated monitoring of
servers to be achieved for example.

> In the third place, no one is going to have any difficulty
> picking out PANICs from "other events" ;-)

Finding them is not so much the problem - it's the fact that the event
log on Windows has a limited size (default 1024Kb on XP) and will
overwrite old events as required. The sort of output you might see from
a busy PostgreSQL server could potentially wipe out relatively new
entries made by other apps.

One possible solution would be to use our own event log which is
possible in 2K+, (but not NT).

> A patch that would be more in the spirit of Postgres is to
> allow different min_log_level values for the different
> possible log destinations (stderr, syslog, eventlog).
> However that looks a lot like a new feature to me, so maybe
> it will have to wait for 8.1.

Yes, that would work, though as you say it's a new feature.

Regards, Dave.

Responses

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Andrew Dunstan 2004-08-12 15:40:00 Re: Import from Linux to Windows
Previous Message Tom Lane 2004-08-12 13:39:37 Re: [pgsql-hackers-win32] error moving table to tablespace (8.0 beta win32 )

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-08-12 16:47:14 Re: [BUGS] 8.0.0beta1: -lpthread missing
Previous Message Tom Lane 2004-08-12 14:39:44 Re: Win32 Event log