PostgreSQL Engine Configuration
PostgreSQL is a realtime database that stores the materialized views and tables generated by your DataSQRL pipeline for low-latency querying.
Configuration Optionsโ
No mandatory configuration keys are required. Physical DDL (tables, indexes, views) is produced automatically by the DataSQRL compiler.
Basic Configurationโ
{
"engines": {
"postgres": {
"config": {
// Optional PostgreSQL-specific settings
}
}
}
}
Deployment Configurationโ
PostgreSQL supports deployment-specific configuration for database scaling and high availability:
| Key | Type | Default | Description |
|---|---|---|---|
instance-size | string | - | Database instance size for compute and memory |
replica-count | integer | - | Number of read replicas (minimum: 0, maximum varies) |
Instance Size Optionsโ
Available instance-size options:
dev- Development/testing size with minimal resourcessmall- Small production workloadsmedium- Medium production workloadslarge- Large production workloadsxlarge- Extra large production workloads
Deployment Exampleโ
{
"engines": {
"postgres": {
"deployment": {
"instance-size": "large",
"replica-count": 2
}
}
}
}
Usage Notesโ
- Database schema is automatically generated from your SQRL script
- Tables, indexes, and views are created based on the compiled data pipeline
- Connection parameters are typically provided via environment variables
- The engine handles both real-time data ingestion and query serving
- Optimized for low-latency reads of materialized data
- Read replicas improve query performance and provide redundancy
Internal Environment Variablesโ
When running pipelines with the DataSQRL run command, the following environment variables are used
in the configuration:
POSTGRES_VERSIONPOSTGRES_HOSTPOSTGRES_PORTPOSTGRES_DATABASEPOSTGRES_AUTHORITYPOSTGRES_JDBC_URLPOSTGRES_USERNAMEPOSTGRES_PASSWORD