Work orders and sessions have a stable core—tenant, status, version and identity—and a changing payload. Our hypothesis was that the changing part would make MongoDB a better fit. PostgreSQL’s JSONB support makes that a question to test.

Both stores passed the tested mechanisms. The completed run recorded 20,000 of 20,000 measured operations, 42 passing correctness and fault checks, and ten passing schema-evolution suites. It did not establish that MongoDB is a better fit. The report records mechanisms-supported and leaves the comparative thesis unresolved.

For this workflow data, our decision from this evidence is to keep PostgreSQL as the default while looking for a workload-specific reason to add or switch databases. In this workload, flexible JSON alone supplied no demonstrated benefit that would justify that change. This is a bounded engineering judgment, not proof that the stores are equivalent or that MongoDB cannot offer a modeling advantage.

The experiment compares application persistence behind Temporal activities; Temporal’s own history store is held constant.

What would make the choice matter?

Storing a JSON object is only the beginning. We need to add fields without breaking older writers, turn a nested field into an indexed query, migrate existing records while writes continue, and keep one business effect when an activity retries after a committed write.

The comparison gives PostgreSQL typed core columns and JSONB, and MongoDB a bounded document. Both keep history and operation receipts separately. Both use native partial updates: PostgreSQL JSONB path updates and MongoDB field updates. Shared application validation keeps the contract equal, but also means this study cannot measure independent developer productivity.

The bounded test

The run completed five paired repetitions at concurrency 1 and 10: 20 cells of 1,000 measured operations, with 1,000 synthetic records across ten tenants and 100 separate warm-up operations per cell. Arm order alternates. The workload mixes 40% reads, 20% tenant-scoped lists, 20% patches, 10% checkpoints and 10% indexed payload queries. Seed payloads are 1–8 KiB, with a 64 KiB maximum: bounded JSON documents, not arbitrary unstructured blobs.

Three changes to the same application contract
TaskWhat must remain true
E1: add a nested optional fieldUnrelated old-client writes preserve the new field; an omitted field remains distinct from a field explicitly set to no value.
E2: query that fieldA tenant-scoped query returns the expected records before and after index creation.
E3: change priority’s shapeA guarded backfill can resume while old and new writers coexist, preserving unknown fields.

Correctness is checked against an independent expected-state oracle. Fault cases cover retries, a worker crash after commit, lost acknowledgments, duplicate signals, database restarts, workflow replay and a clean shutdown followed by a cold filesystem copy and restore. The deliberately duplicated-event negative control was rejected. Replay covers one read workflow under the same code, not a deployment upgrade. Lost workflow-start acknowledgment is simulated by discarding the client handle; the commit-before-acknowledgment case injects a real activity failure.

What the run recorded

Measured on 19 October 2026, from 01:47:53 to 02:12:31 UTC. All twenty cells completed with zero operation errors and no activity retries in the timing cells. Fault tests exercise retries separately. Each arm completed E1, E2 and E3 in every paired repetition. The full run took 24 minutes 38 seconds; the monitor observed a maximum combined owned-process RSS of 837 MiB and experiment files of 1.72 GiB.

Operations per second: median and range across five repetitions
ConcurrencyPostgreSQL JSONBMongoDB
116.49 (15.48–19.37)15.33 (11.07–15.69)
1047.99 (44.93–52.24)42.15 (38.65–43.20)

A separate reproduction with the same frozen source completed another 2,000 operations in two concurrency-10 cells, one per store. Those operations and timings are not pooled with the main run.

These are whole-cell throughput observations on a shared, CPU-throttled host, including Temporal overhead. They are descriptive, not a production performance ranking. Per-operation database and Temporal latency distributions remain separate in the cell records; five repetitions do not establish population tail latency.

What this machine can establish

The pinned stores are PostgreSQL 16.15 on one node and MongoDB 8.0.15 in a one-member replica set. Temporal CLI 1.9.1 runs server 1.32.0 in development mode with SQLite history storage. PostgreSQL synchronous commits and MongoDB majority-plus-journal writes are enabled. A single replica is not a failover test.

Database elapsed time and activity schedule-to-resolution time are recorded separately. Local timings describe a shared host, not production capacity. The restore test covers a clean cold copy, not online backup or point-in-time recovery. Tenant isolation is enforced by the shared application wrapper, not demonstrated as a database security boundary.

Follow-on study: Where would MongoDB earn a place in Odin? tests partial updates and dynamic metadata against optimized PostgreSQL alternatives, with a separate reproduction and an explicit platform decision. The original study’s results below remain unchanged.

Evidence and the next decision

The protocol and source hashes were frozen locally before the counted run. This note makes no claim that the protocol was publicly pre-registered. Run run-2026-10-19T01-47-53-404Z binds the outcome to its inputs; the manifest summary records versions, source hashes and the original manifest digest.

A production decision still needs the real query mix, retention and payload distribution, latency and recovery targets, matched replicated deployments, operating cost and migration cost. Flexible JSON alone does not settle those questions.

Synthetic fixtures only. This application-persistence experiment is separate from EXP 010’s document-store wire-compatibility study.