The same transaction should not have both a row in sl_event and log data
to sl_log_1 or sl_log_2 with the logTrigger. This is not something slonik
would ever do, and the data changes that the logTrigger logs might not get
replicated as part of the event processing(ie for many non SYNC events).
it is also unclear what order the data should be applied in with respect to
the actions of the non-SYNC event.
text *cmdtype_I;
text *cmdtype_U;
text *cmdtype_D;
-
+ bool event_txn;
+
struct slony_I_cluster_status *next;
} Slony_I_ClusterStatus;
if (!TransactionIdEquals(cs->currentXid, newXid))
{
cs->currentXid = newXid;
+ cs->event_txn = true;
+ }
+
+ if(!cs->event_txn)
+ {
+ elog(ERROR,"createEvent called in a data transaction");
}
/*
}
cs->currentXid = newXid;
+ cs->event_txn=false;
}
+ if(cs->event_txn)
+ {
+ elog(ERROR,"Slony-I: log trigger called in an event transaction");
+ }
/*
* Save the current datestyle setting and switch to ISO (if not already)
*/