Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Connect to Postgres

Configure PostgreSQL gateways, develop locally with Docker, and prepare production deployment.

With roles and grants in place, this is the connect stage. Configure the gateway that lets Vulcan reach PostgreSQL, then validate it before writing models.

Connection options

Set these options under gateways.<name>.connection in config.yaml.

Option
Description
Type
Required

type

Engine type name. Must be postgres.

string

Yes

host

The hostname of the Postgres server.

string

Yes

user

The username for authentication.

string

Yes

password

The password for authentication.

string

Yes

port

The port number.

int

Yes

database

The database to connect to. Must already exist.

string

Yes

keepalives_idle

Seconds between keepalive packets.

int

No

connect_timeout

Seconds to wait for the connection (default 10).

int

No

role

The role for authentication.

string

No

sslmode

Connection security level (for example, require).

string

No

application_name

The application name for the connection.

string

No

Authentication methods

  • Username and password (required): set user and password.

  • SSL mode (optional): set sslmode: require or stricter for secure connections in production.

Example gateway config

Minimum local connection:

For a local starter project, Vulcan can use the default PostgreSQL gateway connection. For TLS, add sslmode: require or stricter.

Local development with Docker

PostgreSQL is the one engine you can run end to end on your laptop. Create the Docker network once, then bring up a Postgres container.

Save the following as docker/docker-compose.warehouse.yml:

Use the matching connection (note port 5433 on the host, and DuckDB for local state):

Validate the connection:

--log-to-stdout skips creating a .logs/ directory, which avoids PermissionError when the working directory is not writable.

Production deployment

DataOS Depot is recommended for production. Configure a gateway with type: depot and address: dataos://<depot-name>. The depot manages the Postgres credential and access purpose.

Apply resources in this order:

Two wiring styles are supported. Use a depot gateway (type: depot, address: dataos://<name>), or bind an instance secret into the workflow with envFrom and let config.yaml read WAREHOUSE_* through env_var(). Pick one style per project; do not mix a depot gateway with conflicting environment variables.

Depot purposes

Bind the correct purpose to each secret. Each purpose grants scoped access through the same depot. Assign only the purpose required by each workload. A query credential cannot create tables. Do not give consumers an rw credential.

Purpose
Who uses it
What it allows

rw

Vulcan workflow

Read source tables and create, update, and delete model output.

scan

Metadata scanner

Read information_schema and pg_catalog for catalog metadata.

query

Consumer direct access

Read-only access to Data Product tables.

Next step

After connection configuration is ready, choose a model strategy in Materialization behavior.

Last updated

Was this helpful?