Christopher Browne cbbrowne
Thu Jan 6 19:17:26 PST 2005
RK wrote:

> Oops...
>
> Hi all!
>
> Earlier (2004.10.19) Mr. Cristopher Browne was so kind to answer my 
> question
> here on the list on how to use slony on a hybrid environment. He 
> menitoned:
>
> "You need to have the stored functions available in each PostgreSQL
> instance that is involved with Slony-I clusters, but it doesn't _too_
> much matter where slon and slonik run.  (Performance considerations
> suggest keeping slons nearby the node they are servicing, but that
> doesn't mean "must be on the same host.") "
>
> That's fine and I understood, so I tried to implement it this way: 
> slonik and slon running
> on the linux box, master database is on linux and the slave would be 
> on windows.
>
> When trying to set up I realized an important thing. For example:
>
> -- Function: _celk_test.denyaccess()
>
> -- DROP FUNCTION _celk_test.denyaccess();
>
> CREATE OR REPLACE FUNCTION _celk_test.denyaccess()
>   RETURNS "trigger" AS
> '$libdir/slony1_funcs', '_Slony_I_denyAccess'
>   LANGUAGE 'c' VOLATILE SECURITY DEFINER;
> GRANT EXECUTE ON FUNCTION _celk_test.denyaccess() TO public;
> GRANT EXECUTE ON FUNCTION _celk_test.denyaccess() TO dba WITH GRANT 
> OPTION;
>
> Or another one:
>
> -- Function: _celk_test.btxxidcmp(_celk_test.xxid, _celk_test.xxid)
>
> -- DROP FUNCTION _celk_test.btxxidcmp(_celk_test.xxid, _celk_test.xxid);
>
> CREATE OR REPLACE FUNCTION _celk_test.btxxidcmp(_celk_test.xxid, 
> _celk_test.xxid)
>   RETURNS int4 AS
> '$libdir/xxid', '_Slony_I_btxxidcmp'
>   LANGUAGE 'c' VOLATILE;
>
>
> It seems that Slony procedures and functions calls external C 
> functions that are
> part of the Slony distribtuion, so - as it is not available on windows 
> - I won't run... :(
>
> Is it true? Or is there any chance to set up at least a slave DB 
> instance under W32 - Cygwin?

These C functions _should_ be able to be compiled on Windows(tm), so you 
ought to be able to use the same compiler configuration you used to 
compile PostgreSQL.  I have minimal access to Windows(tm) environments 
of any sort, much less to development environments, so I can't offer any 
wisdom on how to deal with that.

If you do not have the capability to compile PostgreSQL, then that 
likely prevents you from using Slony-I at this time.  That's pretty 
nearly true regardless of platform. 

Version 1.1 should be able to be compiled somewhat separately from the 
PostgreSQL source tree, which will allow systems that have binary 
distribution systems to more easily manage the packaging of Slony-I code.


More information about the Slony1-general mailing list