PostgreSql Db Store

Description

Connection to a Postgres database

Type

postgresql

Category

Db

Configuration in States

The PostgreSql Db Store can be configured directly in the States interface via the Data Stores module. The following configuration modes are available:

Parameters

Name

Description

Mandatory

Default

Comment

Host

The hostname or IP address of the PostgreSQL server

Yes

localhost


Port

The port of the PostgreSQL server

Yes

5432


Database

The name of the target database

Yes


Username

The username used to authenticate

Yes


Password

The password used to authenticate

Yes

Value is hidden

Suffix

Additional parameters appended to the connection string

No


Connection String

A connection string can be entered manually instead of using the parameter form. For the full list of supported connection string parameters, refer to the Npgsql documentation.


Local Configuration

The local configuration is defined in a JSON file (stores.json) deployed directly on the Workers' server. A locally configured store takes priority over a store with the same name configured in the States interface.

Name

Description

Type

Mandatory

Comment

ConnectionString

The connection string to connect to the database

string

True


JSON
{
    "Name": "db_store",
    "Type": "postgresql",
    "HealthCheck": true,
    "Config": {
        "ConnectionString": "Server=localhost;Port=5432;User Id=user;Password=password;Database=database"
    }
}