On 13/01/2016 07:52, Krzysztof Jakowczyk wrote: > No, it doesn't. Take a look: > > # \d emp > Table "public.emp" > Column | Type | Modifiers > ---------+---------+----------- > empname | text | not null > salary | integer | > Triggers: > _b24v2_denyaccess BEFORE INSERT OR DELETE OR UPDATE ON emp FOR EACH > ROW EXECUTE PROCEDURE _b24v2.denyaccess('_b24v2') > Triggers firing always: > __audit BEFORE INSERT OR DELETE OR UPDATE ON emp FOR EACH ROW > EXECUTE PROCEDURE save_query() > > > -- with disabled trigger denyaccess > # insert into emp values ('TEST dasdasdas',123123); > INSERT 0 1 > # select * from audit.slon_audit; > operation | stamp | userid > | query > -----------+----------------------------+----------+--------------------------------------------------- > I | 2016-01-13 06:46:15.417799 | postgres | insert into emp > values ('TEST dasdasdas',123123); > (1 row) > > -- enabling trigger denyaccess > # alter table emp enable trigger _b24v2_denyaccess; > ALTER TABLE > # insert into emp values ('test2',31337); > ERROR: Slony-I: Table emp is replicated and cannot be modified on a > subscriber node - role=0 > # select * from audit.slon_audit; > operation | stamp | userid > | query > -----------+----------------------------+----------+--------------------------------------------------- > I | 2016-01-13 06:46:15.417799 | postgres | insert into emp > values ('TEST dasdasdas',123123); > (1 row) > > > Nothing happend. Any other ideas? >
I guess it is related to the alphabetical order of triggers, as they are both BEFORE triggers. -- Stéphane Schildknecht Contact régional PostgreSQL pour l'Europe francophone Loxodata - Conseil, expertise et formations 06.17.11.37.42 _______________________________________________ Slony1-general mailing list Slony1-general@lists.slony.info http://lists.slony.info/mailman/listinfo/slony1-general