SettleMint
ArchitectureOperability

Database

PostgreSQL serves as the authoritative store for application data, providing ACID guarantees, mature replication capabilities, and enterprise-proven reliability for mission-critical digital asset operations.

Overview

PostgreSQL provides persistent storage for all DALP application data. This includes user accounts, asset configurations, indexed blockchain state, workflow state, and audit records. PostgreSQL's maturity, reliability, and extensive ecosystem make it the foundation for data persistence.

Enterprise deployments require proven database technology. PostgreSQL represents decades of production hardening at scale. Major financial institutions trust PostgreSQL for mission-critical workloads. DALP benefits from this maturity and the extensive expertise available in the market.

Data domains

DomainContentCharacteristics
IdentityUsers, roles, sessionsHigh read, moderate write
ConfigurationAsset definitions, system settingsLow volume, high importance
Indexed stateBlockchain-derived dataHigh volume, append-heavy
WorkflowExecution engine stateModerate volume, frequent updates
AuditActivity logs, compliance recordsHigh volume, append-only

Schema organization

Schemas partition data by domain for organizational clarity and access control:

dalp_identity     - Authentication and authorization
dalp_assets       - Asset configuration and metadata
dalp_indexed      - Chain indexer output
dalp_workflows    - Execution engine state
dalp_audit        - Audit and compliance logs

Schema-level permissions enable principle of least privilege. Components access only schemas required for their function.

High availability

Production deployments implement high availability through PostgreSQL replication:

Rendering diagram...

Synchronous replication: Write operations confirm only after replica acknowledgment. Zero data loss during primary failure.

Read replicas: Query workloads distribute across replicas. Primary handles writes exclusively.

Automatic failover: Patroni or cloud-managed failover promotes replica to primary during outages.

Backup strategy

Data protection implements multiple backup layers:

MethodFrequencyRetentionRecovery time
Streaming replicationContinuousReal-timeMinutes
Point-in-time recoveryContinuous30 daysHours
Full backupsDaily90 daysHours
Archive storageWeekly7 yearsDays

Point-in-time recovery enables restoration to any moment within the retention window. This capability supports compliance investigations and operational recovery scenarios.

Performance optimization

Connection pooling

PgBouncer pools database connections, reducing connection overhead and enabling higher concurrency than direct connections support.

Query optimization

Schema design anticipates query patterns. Indexes cover common filter and join operations. Query analysis guides ongoing optimization.

Partitioning

High-volume tables partition by time or tenant. Partition pruning reduces scan scope for bounded queries. Partition management automates retention enforcement.

Caching

Application-level caching reduces database load for repeated queries. Cache invalidation coordinates with database transactions for consistency.

Security

Encryption

At rest: Storage encryption protects data on disk. Managed deployments use cloud provider encryption with customer-managed keys.

In transit: TLS encrypts all database connections. Certificate verification prevents connection interception.

Access control

Role-based access restricts database operations to authorized components. Service accounts receive minimum necessary privileges. Administrative access requires multi-factor authentication.

Audit logging

PostgreSQL audit logs capture all data access. Log retention satisfies compliance requirements. SIEM integration enables security monitoring.

Managed deployment options

ProviderServiceKey features
AWSRDS PostgreSQLMulti-AZ, automated backups
GCPCloud SQLHigh availability, private networking
AzureAzure DatabaseGeo-replication, compliance certifications
Self-managedPatroni clusterFull control, any infrastructure

See also

On this page