Home > Archive > Slony1 PostgreSQL Replication > September 2005 > PATCH: Slony win32 service registration









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author PATCH: Slony win32 service registration
Magnus Hagander

2005-09-04, 1:26 pm

This patch adds service registration and unregistration and enginge
addition and removal to slon for win32.

Other changes are that the usage information is moved to it's own
function so it could easily be called from more places, and I also added
a "-?" option to force up the usage information.

Finally, this once again fixes the logic for the pgpipe ifdefs so it
works on win32 again - pgpipe is a function and not a macro there..

//Magnus


Dave Page

2005-09-04, 1:26 pm

I will apply this within the next few days if there are no objections.

Regards, Dave.=20

> -----Original Message-----
> From: slony1-general-bounces- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org=20
> [mailto:slony1-general-bounces- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org] On=20
> Behalf Of Magnus Hagander
> Sent: 04 September 2005 18:12
> To: slony1-general- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org
> Subject: [Slony1-general] PATCH: Slony win32 service registration
>=20
> This patch adds service registration and unregistration and enginge
> addition and removal to slon for win32.
>=20
> Other changes are that the usage information is moved to it's own
> function so it could easily be called from more places, and I=20
> also added
> a "-?" option to force up the usage information.
>=20
> Finally, this once again fixes the logic for the pgpipe ifdefs so it
> works on win32 again - pgpipe is a function and not a macro there..
>=20
> //Magnus
>=20
>=20

Dave Page

2005-09-06, 9:24 am

=20

> -----Original Message-----
> From: slony1-general-bounces- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org=20
> [mailto:slony1-general-bounces- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org] On=20
> Behalf Of Magnus Hagander
> Sent: 04 September 2005 18:12
> To: slony1-general- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org
> Subject: [Slony1-general] PATCH: Slony win32 service registration
>=20
> This patch adds service registration and unregistration and enginge
> addition and removal to slon for win32.


Thanks, patch applied.

I think there is an enhancement that should be made however - at
present, when you install the service it actually installs in a state in
which it won't start because no engines have been registered. Perhaps it
should install in 'Disabled' startup mode, which is then set to
'Automatic' when the first engine is registered. When removing the last
engine, it can be set back to 'Disabled'.

Otherwise, on reboot the (potentially scary!) 'A service or device
driver failed at startup - see the system event log for details' error
will likely be displayed.

Thoughts?

Regards, Dave.
Magnus Hagander

2005-09-17, 9:24 am

> > This patch adds service registration and unregistration and enginge=20
>=20
> Thanks, patch applied.
>=20
> I think there is an enhancement that should be made however -=20
> at present, when you install the service it actually installs=20
> in a state in which it won't start because no engines have=20
> been registered. Perhaps it should install in 'Disabled'=20
> startup mode, which is then set to 'Automatic' when the first=20
> engine is registered. When removing the last engine, it can=20
> be set back to 'Disabled'.


I don't like this at all. Once we have installed, we should not modify
the service configuration because what we do may conflict with something
the user did manually. (Say he set it to Manual, then he registers a new
engine, and pop it's in automatic again. Personally I absolutely hate
tools that do that..)


> Otherwise, on reboot the (potentially scary!) 'A service or=20
> device driver failed at startup - see the system event log=20
> for details' error will likely be displayed.
>=20
> Thoughts?


I see the problem. Another solution to this would be to have Slon start
up (and not crash!) and just log a warning in the eventlog if it has no
configured engines? Because something *is* wrong, but we'd show it in a
less scary fashion... Reasonable?

Or possibly just start up and not even log, just standing by for
somebody to do something...

//Magnus
Dave Page

2005-09-17, 8:24 pm

=20

> -----Original Message-----
> From: Magnus Hagander [mailto:mha- +PAb3xVejjn11pZQbBMD
iQ@public.gmane.org]=20
> Sent: 17 September 2005 14:57
> To: Dave Page; slony1-general- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org
> Subject: RE: [Slony1-general] PATCH: Slony win32 service registration
>=20
> and enginge=20
>=20
> I don't like this at all. Once we have installed, we should not modify
> the service configuration because what we do may conflict=20
> with something
> the user did manually. (Say he set it to Manual, then he=20
> registers a new
> engine, and pop it's in automatic again. Personally I absolutely hate
> tools that do that..)


Good point.

>=20
> I see the problem. Another solution to this would be to have=20
> Slon start
> up (and not crash!) and just log a warning in the eventlog if=20
> it has no
> configured engines? Because something *is* wrong, but we'd=20
> show it in a
> less scary fashion... Reasonable?


Yeah, that sounds good. It would probably be useful to log the startup &
shutdown of each engine anyway so it's easy to see what starts and
stops. For that matter, adding or removing an engine should also cause
it to startup or shutdown, or at least output a message telling the user
to restart the service.

Regards, Dave.
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com