Prevent after_commit triggering on Postgres savepoints

Is there any way to prevent after_commit hooks triggering on Postgres savepoints?

I can see some situations where savepoints may want to be treated as “commits” but in our case it’s harmful because we explicitly want to make sure the hook is only firing after a non simulated transaction.

Happy to open a PR if the functionality does not exist and is possible to implement.

@maschwenk Could you explain your use-case a little more? I’m not sure I understand what you’re trying to do.

Afaict there is no way to skip these callbacks, but you could wrap them in a transaction and use that as a signal to trigger other hooks.