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.
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
userandpassword.SSL mode (optional): set
sslmode: requireor 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:
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:
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.
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?