> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paradime.io/llms.txt
> Use this file to discover all available pages before exploring further.

# PostgreSQL

> Connect PostgreSQL to Paradime to run dbt™ against your Postgres database from the Code IDE, schedule Bolt production jobs, and use Agent sessions.

[PostgreSQL](https://www.postgresql.org/) is an open-source relational database system known for its reliability and feature robustness. Connect it to Paradime to run dbt™ from the Code IDE, deploy production jobs with Bolt, and let the DinoAI background agent work against your database.

<Warning>
  **IP restrictions**

  Make sure to allow traffic from one of the Paradime IPs in your firewall depending on the data location selected.

  See also: [Paradime IP addresses](/developers/ip-restrictions).
</Warning>

<Note>
  **Available in:** Code IDE, Bolt, and Agent environments.
</Note>

## Add a connection

1. Click **Settings** in the top menu bar of the Paradime interface to access **Workspace Settings**.
2. In the left sidebar, click **Environments**.
3. Click **Add New** next to the section for the environment you are configuring:
   * **Code IDE** for the Code IDE connection
   * **Bolt** for the Bolt connection
   * **Agent** for the Agent connection
4. Select **PostgreSQL**.
5. In the **Profile Configuration** field, add at least the required parameters. For additional configuration options, see the [Profile fields reference](#profile-fields-reference) section.
6. Provide a dbt™ **Profile Name** (this should match the profile name set in your `dbt_project.yml`).
7. In the **Target** field, enter the target for the environment you are configuring: `dev` for Code IDE, `prod` for Bolt, or `dinoai` for the Agent.
8. The **Schema** field is pre-configured, but you can change it to specify the schema where dbt™ will build objects.
9. The **Threads** value is pre-configured to 1, but you can adjust this to specify how many parallel operations your dbt™ project can run.

<Info>
  After adding the configuration, ensure it's properly formatted using a YAML formatter like [YAML Formatter](https://jsonformatter.org/yaml-formatter).
</Info>

## Profile configuration

```yaml theme={"system"}
host: analytics-db.company.com                # Database host
port: 5432                                    # Connection port
user: analytics_user                          # Database user
password: ****                                # User password
database: analytics_prod                      # Production database
schema: dbt                                   # Default schema
```

## Profile fields reference

| Field            | Description                                                                   | Example             | Default Value  | Required |
| ---------------- | ----------------------------------------------------------------------------- | ------------------- | -------------- | -------- |
| host             | Database server hostname or IP address                                        | `db.company.com`    | None           | ✅        |
| user             | PostgreSQL authentication username                                            | `postgres_user`     | None           | ✅        |
| password         | User authentication password                                                  | `your_password`     | None           | ✅        |
| port             | PostgreSQL server port number                                                 | `5432`              | `5432`         | ✅        |
| dbname           | Name of the target database                                                   | `analytics`         | None           | ✅        |
| schema           | Name of the target schema. This is configured in the UI "Schema" field        | `public`            | `public`       | ✅        |
| threads          | Number of concurrent operations. This is configured in the UI "Threads" field | `4`                 | `1`            | ✅        |
| keepalives\_idle | Time in seconds between connection keepalive pings                            | `60`                | `0`            | ❌        |
| connect\_timeout | Seconds to wait for connection establishment                                  | `10`                | `10`           | ❌        |
| retries          | Number of times to retry failed connections                                   | `3`                 | `1`            | ❌        |
| search\_path     | Order of schemas Postgres will search through                                 | `public, prod`      | `$user,public` | ❌        |
| role             | PostgreSQL role to assume when executing queries                              | `analytics_role`    | None           | ❌        |
| sslmode          | Level of SSL connection security                                              | `verify-full`       | `prefer`       | ❌        |
| sslcert          | Path to client SSL certificate file                                           | `/path/to/cert`     | None           | ❌        |
| sslkey           | Path to client SSL private key file                                           | `/path/to/key`      | None           | ❌        |
| sslrootcert      | Path to SSL root certificate authority file                                   | `/path/to/root.crt` | None           | ❌        |

## Related

<CardGroup cols={2}>
  <Card title="Optional connection attributes" href="/guides/data-warehouse-essentials/optional-connection-attributes" icon="gear" horizontal>
    Set additional `profiles.yml` attributes for this connection.
  </Card>
</CardGroup>


## Related topics

- [Bolt environment](/products/settings/connections/scheduler-environment/index.md)
- [Agent environment](/products/settings/connections/dinoai-background-agent-environment/index.md)
- [Code IDE environment](/products/settings/connections/development-environment/index.md)
- [Security model](/resources/other-important-stuff/security-model.md)
- [dlt Source and Destination Credentials via Environment Variables](/guides/using-dlt-in-paradime/dlt-source-and-destination-credentials-via-environment-variables.md)
