On Fri, 9 Feb 2007, Jan Wieck wrote:
>> Then presumably, the entire thing should look like:
>> =======
>> #!/usr/local/slony/bin/slonik
>>
>> INCLUDE </home/postgres/lib/preamble.slonik>;
>>
>> EXECUTE SCRIPT (
>> SET ID = 1,
>> FILENAME = '/home/postgres/sql/create-test-table.sql',
>> EVENT NODE = 1
>> );
>>
>> CREATE SET (id = 9998, origin = 1, comment = 'temp set');
>> SET ADD TABLE (set id=9998, origin=1, id=15,
>> FULL QUALIFIED NAME = 'public.test', comment='test table');
>>
>> SUBSCRIBE SET (id=9998, provider=1, receiver=2);
>> WAIT FOR EVENT (origin=2, confirmed=1, wait on=2);
>>
>> SYNC(id = 1);
>> WAIT FOR EVENT (origin=1, confirmed =2, wait on=1);
>>
>> MERGE SET ( id = 1, add id = 9998, origin = 1 );
>> ========
>>
>> yah?
>
> Nod!
Looks like I still have it slightly off. The following is from a 3 node slony
cluster with node 3 getting its data from node 2 running slony1-1.2.2:
[EMAIL PROTECTED] ~]$ bin/create_rejected_users.slonik
DDL script consisting of 2 SQL statements
DDL Statement 0: (0,118) [CREATE TABLE rejected_users (
id bigserial PRIMARY KEY,
userid BIGINT,
last_mod_time TIMESTAMP DEFAULT now()
);]
bin/create_rejected_users.slonik:5: NOTICE: CREATE TABLE will create implicit
sequence "rejected_users_id_seq" for serial column "rejected_users.id"
bin/create_rejected_users.slonik:5: NOTICE: CREATE TABLE / PRIMARY KEY will
create implicit index "rejected_users_pkey" for table "rejected_users"
DDL Statement 1: (118,199) [
CREATE INDEX rejected_users_last_mod_time_idx ON
rejected_users(last_mod_time);]
Submit DDL Event to subscribers...
DDL on origin - PGRES_TUPLES_OK
bin/create_rejected_users.slonik:26: PGRES_FATAL_ERROR select
"_jefftest_cluster".mergeSet(1, 9998); - ERROR: Slony-I: set 9998 has
subscriptions in progress - cannot merge
and here's the slonik script:
#!/usr/local/slony/bin/slonik
INCLUDE </home/postgres/lib/preamble-jefftest.slonik>;
EXECUTE SCRIPT (
SET ID = 1,
FILENAME = '/home/postgres/sql/create_rejected_users.sql',
EVENT NODE = 1
);
CREATE SET (id = 9998, origin = 1, comment = 'temp set');
SET ADD TABLE (set id=9998, origin=1, id=125,
FULL QUALIFIED NAME = 'public.rejected_users', comment='rejected_users
table');
SUBSCRIBE SET (id=9998, provider=1, receiver=2, forward=yes);
WAIT FOR EVENT (origin=2, confirmed=1, wait on=2);
SYNC(id = 1);
WAIT FOR EVENT (origin=1, confirmed=2, wait on=1);
SUBSCRIBE SET (id=9998, provider=2, receiver=3, forward=no);
WAIT FOR EVENT (origin=3, confirmed=2, wait on=3);
SYNC(id = 2);
WAIT FOR EVENT (origin=2, confirmed=3, wait on=2);
MERGE SET ( id = 1, add id = 9998, origin = 1 );
Am I using the wrong ids for wait on?
--
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
_______________________________________________
Slony1-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/slony1-general