{"record":{"id":"280c3964752c6d73","repo":"nautechsystems/nautilus_trader","slug":"no-postgres-cache-database-is-configured","errorCode":null,"errorMessage":"No Postgres cache database is configured","messagePattern":"No Postgres cache database is configured","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":938,"sourceCode":"        database\n            .rollback_execution_payload_storage(&keys, batch_size)\n            .await\n    }\n\n    async fn payload_operation_database(&self) -> anyhow::Result<BlockchainCacheDatabase> {\n        anyhow::ensure!(\n            !self.core.is_connected(),\n            \"Disconnect the execution client before payload storage operations\"\n        );\n\n        if let Some(database) = &self.cache.database {\n            return Ok(database.clone());\n        }\n        let options = self\n            .config\n            .postgres_cache_database_config\n            .as_ref()\n            .ok_or_else(|| anyhow::anyhow!(\"No Postgres cache database is configured\"))?;\n        BlockchainCacheDatabase::connect(options.clone().into())\n            .await\n            .context(\"failed to connect to the execution database\")\n    }\n\n    fn load_payload_keys(&self) -> anyhow::Result<Option<PayloadKeySet>> {\n        PayloadKeySet::load(\n            self.config.payload_key_env.as_deref(),\n            &self.config.payload_key_retired_env,\n            self.config.payload_deployment_id.as_deref(),\n        )\n    }\n\n    fn payload_policy(&self) -> PayloadPolicy {\n        PayloadPolicy {\n            chain_id: self.chain.chain_id,\n            signer: self.wallet_address,\n            gas_limit: self.config.gas_limit,","sourceCodeStart":920,"sourceCodeEnd":956,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L920-L956","documentation":"After confirming the client is disconnected, payload_operation_database() falls back to a Postgres cache database taken from config.postgres_cache_database_config. If that option is None and the client's in-memory cache.database is also absent, there is no storage to operate on, so the call fails with this message.","triggerScenarios":"Calling check/protect/rewrap/rollback payload storage on a client constructed without both a durable cache database and postgres_cache_database_config in its ExecutionClientConfig.","commonSituations":"Test or demo configs that omit the Postgres section; operators running maintenance against a client built without cache settings; typo'd config key so the field deserializes to None.","solutions":["Set postgres_cache_database_config in the execution client config (connection options for BlockchainCacheDatabase).","Construct the client with cache.database populated (durable store).","Verify the config file/key spelling so the field actually deserializes.","Run maintenance against the client instance that owns the cache database."],"exampleFix":"// before\nlet config = ExecutionClientConfig::default(); // no postgres section\n// after\nlet config = ExecutionClientConfig {\n    postgres_cache_database_config: Some(PostgresCacheConfig::new(\n        \"postgres://user:pass@localhost:5432/nautilus\",\n    )),\n    ..Default::default()\n};","handlingStrategy":"validation","validationCode":"anyhow::ensure!(\n    config.postgres_cache_database_config.is_some(),\n    \"configure postgres_cache_database_config for payload storage operations\"\n);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Include the Postgres cache section in all live/maintenance configs.","Validate config at startup before opening maintenance sessions.","Keep config keys consistent with the adapter's expected field names."],"tags":["rust","postgres","configuration","payload-storage"],"backgroundTag":"missing-required-config-field","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}