Steve Singer ssinger_pg
Thu Dec 14 20:14:46 PST 2006
I've been playing with the CVS head version of execute script which I think 
is basically the same as 1.2.x

I'm having a hard time seeing where/when the tables on the master are 
altered for replication.

slonik_ddl_script seems to call ddlScript_prepare that gets a config lock, 
checks the node id, and creates a SYNC event.

slonik_ddl_script then seems to execute the script directly on the 
master/origin node one statement at a time.

ddlScript_prepare_int does a lot more, but I don't see that being called.

I started out with a table
CREATE table b (k serial4, a int4, b int4);
ALTER TABLE b  ADD PRIMARY KEY(k);

I then did a series of

execute script(set id=1, filename='test_execute.sql');

where test_execute.sql adds a single column to b.
(I called it 3 times, adding a different column each time)

On some of my attempts the slon was running, on others I didn't have any 
slon processes running.

This is my table


CREATE TABLE b
(
   k serial NOT NULL,
   a int4,
   b int4,
   f int4,
   s int4,
   t text,
   CONSTRAINT b_pkey PRIMARY KEY (k)
)
WITHOUT OIDS;
ALTER TABLE b OWNER TO ssinger;




-- Trigger: _test_logtrigger_2 on b

-- DROP TRIGGER _test_logtrigger_2 ON b;

CREATE TRIGGER _test_logtrigger_2
   AFTER INSERT OR UPDATE OR DELETE
   ON b
   FOR EACH ROW
   EXECUTE PROCEDURE _test.logtrigger('_test', 2, 'kvv');


That isn't right is it?  My alter tables were ONLY done though the execute 
script via slonik.


Am I missing sometime obvious?


Steve Singer



More information about the Slony1-general mailing list