Skip to main content

Operations

Server flags​

FlagDefaultMeaning
--bind127.0.0.1Bind address (LAKESOUL_PG_BIND)
-p, --port5432Listen 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-stylefalseUse virtual-hosted S3 requests
--worker-threads2Tokio worker threads
--metrics-addr127.0.0.1:19090Prometheus metrics listener
--no-metricsoffDo not start the Prometheus endpoint
--subscription-log-dirLAKESOUL_LOG_DIR or a temp directoryLogs for supervised subscription processes
--max-connections0 (unlimited)Concurrent connections
--max-queries-per-user0Concurrent statements per user
--max-result-rows0Row limit per statement
--max-result-bytes0Encoded result size limit per statement
--ivm-defaultoffStart new sessions with lakesoul.ivm.enabled = on (LAKESOUL_PG_IVM_DEFAULT)
--subscription-executorlocallocal starts subscriber children in this server; external leaves them to --subscription-runner (LAKESOUL_PG_SUBSCRIPTION_EXECUTOR)
--subscription-runneroffRun only the subscription supervisor, without the PG wire server
--runner-idhostname / pidLease owner for the subscription runner
--runner-poll-ms2000Subscription runner reconcile interval
--index-maintenance-executorlocallocal supervises one index-maintenance child; external leaves it to a Deployment; off disables deferred builds (LAKESOUL_PG_INDEX_MAINTENANCE_EXECUTOR)
--index-maintenance-runneroffRun only the deferred-index builder, without the PG wire server
--index-runner-idhostname / pidLease owner for the index runner (LAKESOUL_PG_INDEX_RUNNER_ID)
--index-maintenance-poll-ms5000Deferred-index scan interval
--index-lease-ttl-ms60000Lease 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-tlsoffRefuse clients that do not negotiate TLS (LAKESOUL_PG_REQUIRE_TLS)
--jwt-authoffRequire a LakeSoul JWT as the connection password (LAKESOUL_PG_JWT_AUTH)
--rbacoffConfine 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 ....

Next​