The roadmap and triggers

I’m curious about the roadmap for trigger support.

HashiCorp Boundary is a bit different that other HashiCorp products. It uses an rdbms (postgres) for its system state vs the typical raft model of our other products. Boundary makes use of triggers quite a bit and it would be wonderful if our users could deploy Boundary with cockroachdb as it’s database. Unfortunately that’s not even a possibility until cockroachdb supports triggers.

You can track it on github: sql: Add support for triggers in CockroachDB · Issue #28296 · cockroachdb/cockroach · GitHub

What are the triggers used for? Writing audit entries to an access log? Given the serialised semantics of cockroachdb, that could get into strange consistency scenarios. Would CDC for the side-channel write be an option? CDC is guaranteed to eventually write every write/update to Kafka

Our triggers are not used for audit entries.

We have about 30 or so triggers for a variety of purposes but the primary ones are type/subtypes (cross tables), and insuring data consistency on writes (row level) within the database. The type/subtypes could be implemented without triggers, but the data consistency use-cases really need triggers.