Thu Dec 14 21:45:44 PST 2006
- Previous message: [Slony1-general] CVS execute script
- Next message: [Slony1-general] "CREATE OR REPLACE function ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>
> I've been playing with the CVS head version of execute script which I
> think
> is basically the same as 1.2.x
Correct.
> I'm having a hard time seeing where/when the tables on the master are
> altered for replication.
Urk, right...
> slonik_ddl_script seems to call ddlScript_prepare that gets a config lock,
> checks the node id, and creates a SYNC event.
That's supposed to drop the logtrigger functions.
> 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.
That won't be called; that is only invoked on remote nodes.
> 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.
Right... One would expect the trigger to become of the form...
_test.logtrigger('_test', 2, 'kvvvvv');
> Am I missing sometime obvious?
For a fairly obscure value of "obvious"...
[See recent commits...]
- Previous message: [Slony1-general] CVS execute script
- Next message: [Slony1-general] "CREATE OR REPLACE function ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list