Configuration
Database Configuration
Configure PostgreSQL connection for metadata storage
Database Configuration
Configure the PostgreSQL connection for metadata storage.
Options
database:
host: localhost
port: 5432
user: iceberg
password: iceberg
database: iceberg_catalog
ssl_mode: disable
max_open_conns: 25
max_idle_conns: 5
conn_max_lifetime: 5m
conn_max_idle_time: 5mReference
| Option | Type | Default | Description |
|---|---|---|---|
host | string | localhost | PostgreSQL server hostname |
port | integer | 5432 | PostgreSQL server port |
user | string | iceberg | Database user |
password | string | iceberg | Database password |
database | string | iceberg_catalog | Database name |
ssl_mode | string | disable | SSL mode (disable, require, verify-ca, verify-full) |
max_open_conns | integer | 25 | Maximum open connections |
max_idle_conns | integer | 5 | Maximum idle connections |
conn_max_lifetime | duration | 5m | Maximum connection lifetime |
conn_max_idle_time | duration | 5m | Maximum connection idle time |
Environment Variables
ICEBERG_DATABASE_HOST=localhost
ICEBERG_DATABASE_PORT=5432
ICEBERG_DATABASE_USER=iceberg
ICEBERG_DATABASE_PASSWORD=iceberg
ICEBERG_DATABASE_DATABASE=iceberg_catalog
ICEBERG_DATABASE_SSL_MODE=disable
ICEBERG_DATABASE_MAX_OPEN_CONNS=25SSL Modes
| Mode | Description |
|---|---|
disable | No SSL (development only) |
require | Use SSL but don't verify certificate |
verify-ca | Verify server certificate against CA |
verify-full | Verify certificate and hostname |
Production SSL Configuration
database:
host: postgres.example.com
ssl_mode: verify-fullConnection Pool Tuning
Default Settings
Suitable for most workloads:
database:
max_open_conns: 25
max_idle_conns: 5
conn_max_lifetime: 5m
conn_max_idle_time: 5mHigh-Throughput Settings
For high request rates:
database:
max_open_conns: 100
max_idle_conns: 25
conn_max_lifetime: 30m
conn_max_idle_time: 10mDatabase Setup
Create Database
CREATE DATABASE iceberg_catalog;
CREATE USER iceberg WITH PASSWORD 'your-secure-password';
GRANT ALL PRIVILEGES ON DATABASE iceberg_catalog TO iceberg;Migrations
Bingsan automatically runs database migrations on startup. No manual schema setup is required.
Troubleshooting
Connection Refused
- Verify PostgreSQL is running
- Check host and port settings
- Ensure network connectivity
Authentication Failed
- Verify user and password
- Check PostgreSQL's
pg_hba.conffor allowed connections
Too Many Connections
- Reduce
max_open_conns - Increase PostgreSQL's
max_connections