Skip to main content

build_postgres_kv_backend

Function build_postgres_kv_backend 

Source
pub async fn build_postgres_kv_backend(
    store_addrs: &[String],
    cfg: Option<Config>,
    tls_config: Option<TlsOption>,
    schema_name: Option<&str>,
    table_name: &str,
    max_txn_ops: usize,
    auto_create_schema: bool,
) -> Result<KvBackendRef>
Expand description

Builds a Postgres-backed metadata [KvBackendRef].

  • store_addrs - Postgres connection URLs; only the first address is used.
  • cfg - optional deadpool config to customize pool/session behavior.
  • tls_config - optional TLS settings for the Postgres connection.
  • schema_name - optional schema containing the metadata table.
  • table_name - metadata KV table name.
  • max_txn_ops - maximum operations allowed in one metadata transaction.
  • auto_create_schema - whether to create schema_name when it is missing.