Operations
Server flags
| Flag | Default | Meaning |
|---|---|---|
--bind | 127.0.0.1 | Bind address (LAKESOUL_PG_BIND) |
-p, --port | 5432 | Listen port (LAKESOUL_PG_PORT) |
--warehouse-prefix | — | Base location for new table data (LAKESOUL_WAREHOUSE) |
--endpoint | — | S3-compatible endpoint (AWS_ENDPOINT) |
--s3-bucket | — | Default bucket (AWS_BUCKET) |
--s3-access-key | — | Access key (AWS_ACCESS_KEY_ID) |
--s3-secret-key | — | Secret key (AWS_SECRET_ACCESS_KEY) |
--s3-virtual-host-style | false | Use virtual-hosted S3 requests |
--worker-threads | 2 | Tokio worker threads |
--metrics-addr | 127.0.0.1:19090 | Prometheus metrics listener |
--no-metrics | off | Do not start the Prometheus endpoint |
--subscription-log-dir | LAKESOUL_LOG_DIR or a temp directory | Logs for supervised subscription processes |
--max-connections | 0 (unlimited) | Concurrent connections |
--max-queries-per-user | 0 | Concurrent statements per user |
--max-result-rows | 0 | Row limit per statement |
--max-result-bytes | 0 | Encoded result size limit per statement |
--ivm-default | off | Start new sessions with lakesoul.ivm.enabled = on (LAKESOUL_PG_IVM_DEFAULT) |
--subscription-executor | local | local starts subscriber children in this server; external leaves them to --subscription-runner (LAKESOUL_PG_SUBSCRIPTION_EXECUTOR) |
--subscription-runner | off | Run only the subscription supervisor, without the PG wire server |
--runner-id | hostname / pid | Lease owner for the subscription runner |
--runner-poll-ms | 2000 | Subscription runner reconcile interval |
--index-maintenance-executor | local | local supervises one index-maintenance child; external leaves it to a Deployment; off disables deferred builds (LAKESOUL_PG_INDEX_MAINTENANCE_EXECUTOR) |
--index-maintenance-runner | off | Run only the deferred-index builder, without the PG wire server |
--index-runner-id | hostname / pid | Lease owner for the index runner (LAKESOUL_PG_INDEX_RUNNER_ID) |
--index-maintenance-poll-ms | 5000 | Deferred-index scan interval |
--index-lease-ttl-ms | 60000 | Lease lifetime; a heartbeat renews it while a large index builds |
--distributed-workers | — | Comma-separated worker endpoints |
--distributed-fallback-to-local | — | Run a query locally when distributed planning fails |
--tls-cert | — | PEM certificate chain for TLS (LAKESOUL_PG_TLS_CERT) |
--tls-key | — | PEM PKCS#8 private key for TLS (LAKESOUL_PG_TLS_KEY) |
--require-tls | off | Refuse clients that do not negotiate TLS (LAKESOUL_PG_REQUIRE_TLS) |
--jwt-auth | off | Require a LakeSoul JWT as the connection password (LAKESOUL_PG_JWT_AUTH) |
--rbac | off | Confine each connection to the token's domain (LAKESOUL_PG_RBAC, requires --jwt-auth) |
Incremental SQL and distributed execution can be enabled together; every worker must be built with IVM and the same protocol generation.
IVM is always installed. --ivm-default only changes the initial value of the
per-session lakesoul.ivm.enabled switch; SET still overrides it.
--subscription-executor external makes CREATE/DROP/ALTER SUBSCRIPTION
control-plane operations in metadata. A separate process must run
postgres-lakesoul --subscription-runner; see
PostgreSQL subscriptions.
--index-maintenance-executor local starts one child
postgres-lakesoul --index-maintenance-runner and restarts it with backoff.
The child builds pending indexes for tables with
index_maintenance = 'deferred'; external leaves that process to a separate
Deployment (the Helm chart's indexMaintenance.mode: runner). Runners take a
lease in maintenance.lease, so only one of them works at a time. The lease
requires the metadata schema from script/meta_init.sql or
script/metadata_migrate.py.
--jwt-auth and --rbac are covered in
Authentication and Permissions.
Runtime limits
Limits are enforced per connection and per statement. A result that exceeds
--max-result-rows or --max-result-bytes fails the statement instead of
streaming an unbounded result. --max-queries-per-user limits concurrent
statements for one user; --max-connections limits the process.
Metrics
The server exposes Prometheus metrics on --metrics-addr:
lakesoul_query_requests_total,lakesoul_query_rows_total,lakesoul_query_duration_seconds— query outcomes and latency, labelled by outcome.lakesoul_memory_reservation_failures_total— memory admission failures.lakesoul_worker_discovery_snapshot_age_seconds,lakesoul_worker_discovery_eligible_workers,lakesoul_worker_discovery_refresh_failures_total— distributed discovery.lakesoul_auth_failures_total{reason}— connections refused during token authentication, by reason.
Cancellation
PostgreSQL cancel requests are honoured: cancelling a query stops the execution and releases its workers. A cancelled statement does not leave the connection unusable.
Logs and tracing
RUST_LOG controls the log filter. LAKESOUL_LOG_DIR tees logs to a directory
for collection, and SIGHUP reloads the filter from
LAKESOUL_LOG_FILTER_FILE. OTLP tracing is enabled when the tracing
configuration provides an endpoint.
Distributed execution
cargo run -p postgres-lakesoul -- --port 5433 \
--warehouse-prefix s3://bucket/warehouse \
--distributed-workers http://127.0.0.1:50051,http://127.0.0.1:50052
The coordinator plans across the workers and falls back to local execution only
when --distributed-fallback-to-local is set. Kubernetes discovery is available
with --discovery kubernetes --k8s-worker-service ... --k8s-namespace ....