Largo Stemper samurai58
Mon Dec 18 06:55:20 PST 2006
Hi everybody

I want to test everything that is related to my functions
I used (as you told me ) to use take advantage of EXECUTE SCRIPT , like this :
- Insert the "EXECUTE SCRIPT" into the SLONIK subbscribe script as all the tables, set description and all other elements...
- I get my functions as expected, but ALWAYS only on the Master and not on the slave.
(I only put the EXECUTE SCRIPT on the slinik script on the master while initializing)
- It is exact similar to the creation of a function though "/i myfile.sql" on the master.
- Or may be I am doing something wrong : so is it possible to create a function on both of master and slave?

=> If it is not possible I made a workaround , so please tell me if it is safe or not !
- Initiate and let the replication Run.
- I execute parallel in both of master and slave : "/i myfile_function.sql"
- I get in both of them the exact version of my function in order to have my funct. on the slave for the case of a failover.

 But I think it is not a good solution.

So please can you explain in details how I insert my sql-file in the slonik-script to habe my function also appearing in both master and slave.


Thanks in advance
Largo
----------------------------------------------------------------------------------------
On Friday 15 December 2006 07:29, Largo Stemper wrote:
> > Hello Everybody
> >
> > That´s me again asking about how is SLONY with functions.
> >
> > I tested it with functions and there is a special one (the last I create)
> > that can only be found only on the master. If I execute it the result will
> > be transferred to the slave !
> >
> > I wanna know :
> > - Why is this functions not replicated by slony to the slave ?
> > Because I will need it  on it if I face a  FAILOVER. Here is the output and
> > the function has the name largo2 , like this largo2(integer,integer)

did you use the slonik command EXECUTE SCRIPT to load the function into your 
replication set?  I'm guessing not.  Please see the slony1 admin guide 
http://www.dbitech.ca/slony/book for more information on best practices as 
well as how execute script works.



> >
> > -------------- On Master: --------------
> >
> > mydatabase2=> \df largo2
> >                     List of functions
> >  Schema |  Name  | Result data type | Argument data types
> > --------+--------+------------------+---------------------
> >  public | largo2 | numeric          | integer, integer
> >
> >
> > -------------- On Slave: --------------
> >
> > mydatabase2-# \df largo2
> >                    List of functions
> >  Schema | Name | Result data type | Argument data types
> > --------+------+------------------+---------------------
> > (0 rows)
> >
> >
> >
> >  Thanks in advance
> >
> >
> > ---------------------------------------------------------------------------
> >----------------
> >
> > Andrew Sullivan wrote:
>> > > On Fri, Dec 08, 2006 at 12:20:49PM +0100, Largo Stemper wrote:
>>> > >>  Does it represent any kind of problem if I :
>>> > >>  - Use functions , while replicating
>> > >
>> > > No
>> > >
>>> > >>  - Overwrite the functions and keep SLONY-I working
>> > >
>> > > That should be ok.
>> > >
>>> > >>  - Will I get on the master (throuh replication) the new form of my
>>> > >>  function or no?
>> > >
>> > > No.
>> > >
>> > > A
> >
> > _____________________________________________________________________
> > Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> > http://smartsurfer.web.de/?mc=100071&distributionid=000000000066
> >
> > _______________________________________________
> > Slony1-general mailing list
> > Slony1-general at gborg.postgresql.org
> > http://gborg.postgresql.org/mailman/listinfo/slony1-general
_______________________________________________
Slony1-general mailing list
Slony1-general at gborg.postgresql.org
http://gborg.postgresql.org/mailman/listinfo/slony1-general

______________________________________________________________________________
"Ein Herz f?r Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de
Unser Dankesch?n: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht!




More information about the Slony1-general mailing list