// the find
JasperFx/marten
.NET Transactional Document DB and Event Store on PostgreSQL
Marten turns PostgreSQL into a document database and ACID-compliant event store for .NET applications, using PostgreSQL's JSONB support under the hood. It targets .NET teams who want document/event-sourcing patterns without introducing a separate database engine. Actively maintained with recent commits and commercial support available from JasperFx.
- The event sourcing implementation is genuinely mature: it includes an async daemon for projection rebuilding, multi-stream projections, snapshotting, archiving, and subscription support — not just basic append-log primitives.
- LINQ provider translates C# queries to SQL against JSONB columns, including child collection queries, full-text search, and compiled queries that cache the query plan, which matters at scale.
- Schema management is automatic and migration-aware — Marten will diff the expected schema against the live database and apply patches, reducing the operational gap between code changes and DB state.
- Test infrastructure is well thought out with multiple base context types (IntegrationContext, OneOffConfigurationsContext, etc.) that isolate schema per test fixture and support parallel xUnit runs against a real database.
- LINQ support has real gaps — complex joins, group-by aggregations, and some nested collection queries either fall back silently to client-side evaluation or throw at runtime, which you won't discover until you test those specific paths.
- The async daemon (projection rebuilding) adds meaningful operational complexity: it requires careful tuning of shard counts, batch sizes, and error handling policies, and the docs describe what knobs exist without much guidance on what to actually set in production.
- PLV8 dependency for the older patching API required a JavaScript engine embedded in PostgreSQL, which is notoriously painful to install and is now deprecated — but existing users are stuck migrating, and the migration path is documented minimally.
- Multi-tenancy support exists but schema-per-tenant mode has real limitations around cross-tenant queries and projection fan-out that can surprise you mid-project rather than at design time.