On Fri, 2007-01-26 at 10:13 -0500, Andrew Sullivan wrote:
> On Fri, Jan 26, 2007 at 09:55:55AM -0500, Sven Willenberger wrote:
> > 
> > Now there is a [tablename] on B and C to which I added a column and then
> > subsequently created a default value for.
> 
> How did you do this?
> 
> A
> 

If you are asking what the actual ddl script contained, it goes as
follows:
# cat ddlscript.sql
ALTER TABLE customer ADD billed BOOL;
ALTER TABLE customer ALTER billed SET DEFAULT false;

# cat slony_execute_script.sh
#!/usr/local/bin/bash

slonik <<_EOF_ 2>> /usr/local/etc/slony/slony_setup.log 1>> 
/usr/local/etc/slony/slony_setup.log
        cluster name = T2;
        node 1 admin conninfo = 'dbname=dbA host=ipA port=5432 user=slony 
password=****';
        node 2 admin conninfo = 'dbname=dbB host=ipB port=5432 user=slony 
password=****';
        node 3 admin conninfo = 'dbname=dbC host=ipC port=5432 user=slony 
password=****';

        try {
                EXECUTE SCRIPT ( SET ID = 2, FILENAME = 'ddlscript.sql', EVENT 
NODE = 2);
        }
        on error {
                echo 'Failed to execute script';
                exit -1;
        }
_EOF_

As I have stated the changes were properly executed by the script on the
target tables, but the changes were attempted on the node that was not
part of this set.

Sven


_______________________________________________
Slony1-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/slony1-general

Reply via email to