Christopher Browne cbbrowne
Mon Jan 17 21:56:52 PST 2005
Jeff Amiel <jamiel at istreamimaging.com> writes:
> Does anyone have any tips to keep slon running while postgresql is
> running and viceversa?
>
> I was going to have my postgres startup script launch slon (along with
> pg_autovacuum) after the database starts.
>
> However, if the database dies, slon continues on (I think)....then
> when I restart postgres, I'd have 2 copies of slon running.

Not really a problem; slon processes die when the postmaster dies.

> What if there are 2 (or more) copies of slon running? what harm can
> come?

Considerable harm could occur if multiple instances were connected to
a particular node, but that can't happen, as they check to make sure
there _isn't_ another one running.

Mind you, you may be misunderstanding a bit.  If you have 2 nodes in a
replication cluster, you need 2 slons running.  If you have 10 nodes,
there need to be 10 slons running.

> Has anyone written any scripts to keep the two (postgres and slon)
> married up?

Not as such.  I have some "watchdog" scripts that try to keep Slony-I
running.  If PostgreSQL is down, the relevant slons won't start.

See the "altperl" directory in the Slony-I distribution.
-- 
"cbbrowne","@","ca.afilias.info"
<http://dev6.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)


More information about the Slony1-general mailing list