Re: pg_autovacuum Win32 service patch

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>, <pgsql-hackers-win32(at)postgresql(dot)org>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_autovacuum Win32 service patch
Date: 2004-05-06 15:22:11
Message-ID: 03AF4E498C591348A42FC93DEA9661B889FC8F@mail.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32

> -----Original Message-----
> From: Magnus Hagander [mailto:mha(at)sollentuna(dot)net]
> Sent: 06 May 2004 15:49
> To: Dave Page; pgsql-hackers-win32(at)postgresql(dot)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.

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2004-05-06 15:27:10 Re: PostgreSQL pre-fork speedup
Previous Message Adrian Phillips 2004-05-06 15:21:18 Re: PostgreSQL pre-fork speedup

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Andrew Dunstan 2004-05-06 21:09:27 regression failures - further data
Previous Message Magnus Hagander 2004-05-06 14:48:40 Re: pg_autovacuum Win32 service patch