Closed BrentWheeldon closed 9 years ago
There's a PgAuditLog::Function::DISABLED_USER
constant - setting current user to that should cause the trigger to exit immediately, maybe that helps.
We’d prefer to never implicitly disable triggers for fear that auditing would be unknowingly turned off, posing increased risk. Instead you can use PgAuditLog::Triggers.without_triggers { do_stuff }
to turn off triggers for a block (which essentially does what @tmikoss suggested under-the-hood).
The audit log insertions slow AR migrations down a lot (>30mins to less than 10 seconds).