

> -----Original Message-----
> From: Magnus Hagander [mailto:mha@sollentuna.net] 
> Sent: 06 May 2004 15:49
> To: Dave Page; pgsql-hackers-win32@postgresql.org
> Subject: RE: [pgsql-hackers-win32] pg_autovacuum Win32 service patch
> 
> Hi!
> 
> A few quick comments:
> 1a) Please don't use such a long name for event source. It's 
> so hard to browse in the event viewer :-)

OK, "PostgreSQL Auto Vacuum"? "Auto Vacuum" seems a little, um, vague.

> 1b) Yes, the same problem with the main code. I think we'll 
> want to create a specific messagel ibrary that just maps all 
> events to "%1" to show the string. This one could be shared 
> between any processesw that need it. This should probably go 
> up on the win32 TODO list - Claudio or Bruce?

Yeah, that was the way I was thinking...

> 1c) Yes, errorlevels = nice. Most (I would think at least) 
> management tools that crawl eventlogs over all your servers 
> to tell you about things that are wrong will look for 
> warning/error messages only...

I'll look at refactoring log_error to do something. Any thoughts on the
internal levels? How about

LVL_DEBUG
LVL_INFO
LVL_WARNING
LVL_ERROR

> 2) I'll go there again - there *needs* to be a way to make it 
> run as != local system. If we make the main server *forcibly* 
> refuse Local System, then we should do the same here. If we 
> go to warning, we should do that here. But there needs to be 
> an easy way to install it as != admin. 

OK, shouldn't be a problem.

> 3) For the main service, I think the decision was to put them 
> in the service startup commandlien in the registry. We should 
> probably stick to the same method with this one.

OK, that can be done, but what about the password? That'll be in plain
text for any user to read. Of course, that isn't an issue for the
server.
 
> 
> A thought - are there more processes that would need this? Is 
> there any point to putting some of the service code in a 
> library (pgport, even?) to be shared between processes, so we 
> don't have to reinvent the wheel over and over again?

The install/remove code is easily made generic, the ControlHandler less
so though as it is specific to the service. That's maybe 40 lines of
code - is it worth it?

Regards, Dave.

Thu, 6 May 2004 16:22:11 +0100
"Dave Page" <dpage@vale-housing.co.uk>
Re: pg_autovacuum Win32 service patch