Steve Singer steve at ssinger.info
Sun Mar 26 10:03:22 PDT 2017
Someone reported an issue to me though email (Slony Bugzilla was 
shutdown and no one seems interested in having it fixed)

They creating events though the stored functions API directly and 
noticing that if they also did data change actions in the same 
transaction the plan for the log trigger could be wrong.

The logTrigger sets up cs->plan_active_log  on a   new transaction but 
createEvent doesn't.  If the logTrigger is then invoked later in that 
transaction it doesn't touch cs_plan_active_log since the transaction 
isn't 'new'.

I think the correct fix is to disallow logTrigger and createEvent in the 
same tranaction.  Slonik would never do this, and for a lot of event 
types (ie non SYNC events) I'm not sure the data in the log trigger will 
be sent in the proper order.

I propose the attached patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Explicitly-disallow-createEvent-and-data-changes-in-.patch
Type: text/x-diff
Size: 0 bytes
Desc: not available
Url : http://lists.slony.info/pipermail/slony1-hackers/attachments/20170326/772eaacb/attachment.patch 


More information about the Slony1-hackers mailing list