Home > Archive > Slony1 PostgreSQL Replication > July 2005 > Service handling of Slon









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 Service handling of Slon
Hiroshi Saito

2005-07-05, 3:23 am

Should turn with Win32 the operation of Slon is Services.
It looks like pg_ctl, and it entails a kill signal. Therefore,
I propose it as sl_ctl. Then, it thinks that it should be used
in all the platforms. (don't kill -9 slon....)

any comment?

Regards,
Hiroshi Saito
cbbrowne-swQf4SbcV9C7WVzo/KQ3Mw@public.gmane.org

2005-07-05, 3:23 am

> Should turn with Win32 the operation of Slon is Services.
> It looks like pg_ctl, and it entails a kill signal. Therefore,
> I propose it as sl_ctl. Then, it thinks that it should be used
> in all the platforms. (don't kill -9 slon....)


That sounds like a most interesting idea, and I'd suggest that it's not
"just for Windows" (much as pg_ctl runs everywhere).

Amongst the useful features would include:

- Using the option that specifies a PID file, thereby meaning you have
a clear way of getting at the PID

- Having an option to indicate that config should be stored in a
"slon.conf" file

- Control over logging...
Hiroshi Saito

2005-07-05, 3:23 am

> That sounds like a most interesting idea, and I'd suggest that it's not
> "just for Windows" (much as pg_ctl runs everywhere).


Yea, It imagines Dave now.:-)

> - Control over logging...


Yes, eventlog is necessary for the one for Windows. I expect pgevent again.
They do the origin for include of slon-daemon. It is control by slon.conf.
Probably, syslog option contains eventlog, and it is expanded.

syslog plan..

0: off
1: syslog and the standard output
2: only syslog
3: eventlog (new option) ?

or , As a case of the windows

0: off
1: eventlog and the standard output
2: only eventlog

Which is more suitable?

Regards,
Hiroshi Saito
Dave Page

2005-07-05, 3:23 am

=20

> -----Original Message-----
> From: Hiroshi Saito [mailto:saito- BlLeDYhMEWED+c6HKvR8
e3f5DAMn2ifp@public.gmane.org]=20
> Sent: 05 July 2005 03:03
> To: slony1-general- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org
> Cc: Magnus Hagander; Andreas; Dave Page
> Subject: Service handling of Slon
>=20
> Should turn with Win32 the operation of Slon is Services.
> It looks like pg_ctl, and it entails a kill signal.=20


No - there is not sl_ctl at present, so we should not add one. We only
did that on PostgreSQL because pg_ctl already existed. Adding the
service code directly to slon is no problem anyway - that's how I did it
with pg_autovacuum.

> Therefore,=20
> I propose it as sl_ctl. Then, it thinks that it should be used=20
> in all the platforms. (don't kill -9 slon....)


'kill -9' is not a problem. In PostgreSQL that warning is given because
an individual backend cannot properly release locks and clean shared
memory if it's kill -9'd. The same warning used to be given for the
postmaster, however that can recover cleanly using WAL in modern
versions. Kill -9 should not be an issue for Slon.

Regards, Dave.
Dave Page

2005-07-05, 3:23 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 cbbrowne-swQf4SbcV9C7WVzo/KQ3Mw@public.gmane.org
> Sent: 05 July 2005 03:43
> To: Hiroshi Saito
> Cc: slony1-general- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org
> Subject: Re: [Slony1-general] Service handling of Slon
>=20
>=20
> That sounds like a most interesting idea, and I'd suggest=20
> that it's not
> "just for Windows" (much as pg_ctl runs everywhere).


As I just posted in another message, given that there is not sl_ctl at
the moment, my preference would be too simply incorporate the service
control code directly into slon, which is probably actually easier than
keeping it separate. If an sl_ctl is created for other purposes though,
I would not object to us putting our service code in it instead.

> Amongst the useful features would include:
>=20
> - Using the option that specifies a PID file, thereby=20
> meaning you have
> a clear way of getting at the PID
>=20
> - Having an option to indicate that config should be stored in a
> "slon.conf" file
>=20
> - Control over logging...


Can these issues not be resolved fairly easily in Slon anyway?

Regards, Dave.
Hiroshi Saito

2005-07-05, 3:23 am

> No - there is not sl_ctl at present, so we should not add one. We only
> did that on PostgreSQL because pg_ctl already existed. Adding the
> service code directly to slon is no problem anyway - that's how I did it
> with pg_autovacuum.


Ooops, Do you work service into slon?
>From the main of slon to control exec slon process.

Probably, you are the thought which solves a HUP problem.:-)

Regards,
Hiroshi Saito
Dave Page

2005-07-05, 3:23 am

=20

> -----Original Message-----
> From: Hiroshi Saito [mailto:saito- BlLeDYhMEWED+c6HKvR8
e3f5DAMn2ifp@public.gmane.org]=20
> Sent: 05 July 2005 08:31
> To: Dave Page; slony1-general- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org
> Cc: Magnus Hagander; Andreas
> Subject: Re: Service handling of Slon
>=20
> one. We only
> how I did it
>=20
> Ooops, Do you work service into slon?


Not yet, but if Magnus gets short of time when he's porting the rest of
it, I can help out with that.

> From the main of slon to control exec slon process.
> Probably, you are the thought which solves a HUP problem.:-)


>From a brief glance at the code, HUP just restarts slon using

slon_kill_child() & execvp() so putting in a huge amount of work to
emulate signals is probably of little benefit (unless I missed
something), given that the SCM makes it nice and easy to restart a
service on Windows.

/D
Hiroshi Saito

2005-07-05, 3:23 am

> >From a brief glance at the code, HUP just restarts slon using

> slon_kill_child() & execvp() so putting in a huge amount of work to
> emulate signals is probably of little benefit (unless I missed
> something), given that the SCM makes it nice and easy to restart a
> service on Windows.


Umm, Does it mean to add SCM management to pgAdmin?

Regards,
Hiroshi Saito
Dave Page

2005-07-05, 3:23 am

=20

> -----Original Message-----
> From: Hiroshi Saito [mailto:saito- BlLeDYhMEWED+c6HKvR8
e3f5DAMn2ifp@public.gmane.org]=20
> Sent: 05 July 2005 09:01
> To: Dave Page; slony1-general- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org
> Cc: Magnus Hagander; Andreas
> Subject: Re: Service handling of Slon
>=20
>=20
> Umm, Does it mean to add SCM management to pgAdmin?


That depends if Andreas can come up with a nice way to do so :-). With
potentially multiple nodes running on a single box, we'd need some
sensible way to record which services are running on the local machine.
They will need to tie into PostgreSQL instances which may or may not be
on the same machine, and may or may not be a registered server for any
given user.

I'm having a hard job figuring out a nice way to do that.

At the very least though, we will have the services control panel applet
- Windows users will be far more familiar with that than using sl_ctl on
the command line.

Regards, Dave.
Andreas Pflug

2005-07-05, 7:24 am

Dave Page wrote:

>
>
>
>
>
>That depends if Andreas can come up with a nice way to do so :-). With
>potentially multiple nodes running on a single box, we'd need some
>sensible way to record which services are running on the local machine.
>They will need to tie into PostgreSQL instances which may or may not be
>on the same machine, and may or may not be a registered server for any
>given user.
>
>I'm having a hard job figuring out a nice way to do that.
>
>

I got the vague idea of a daemon controller in the back of my head. I'd
like to have pgAdmin controll any pg related service (postmaster, slon,
pgAgent), regardless of server or client platform. Currently we have
only some aspects controllable.

Regards,
Andreas
Dave Page

2005-07-05, 7:24 am

=20

> -----Original Message-----
> From: Andreas Pflug [mailto:pgadmin- fm2TWiLXNCrrZyGJdb+2
erNAH6kLmebB@public.gmane.org]=20
> Sent: 05 July 2005 10:57
> To: Dave Page
> Cc: Hiroshi Saito; slony1-general- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org;=20
> Magnus Hagander
> Subject: Re: Service handling of Slon
>=20
> I got the vague idea of a daemon controller in the back of my=20
> head. I'd=20
> like to have pgAdmin controll any pg related service=20
> (postmaster, slon,=20
> pgAgent), regardless of server or client platform. Currently we have=20
> only some aspects controllable.


Oh, a kindof pgAdmin registration server perhaps? "Register your
servers, pgAgents and Slons here, and have all your pgAdmin's connect to
me" type of thing?

Regards, Dave.
Andreas Pflug

2005-07-05, 7:24 am

Dave Page wrote:

>
>
>
>
>
>Oh, a kindof pgAdmin registration server perhaps? "Register your
>servers, pgAgents and Slons here, and have all your pgAdmin's connect to
>me" type of thing?
>
>

Yup. Problem is, I don't like an additional port/auth mechanism, so I'd
like to use a pgsql connection for that. Making the slave controlling
the master... Still things to elaborate.

Regards,
Andreas

>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