Skip to content

Commit 9e48b8a

Browse files
committed
feat: adding postgres application name
1 parent 35216a2 commit 9e48b8a

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

docs/integrations/engines/postgres.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@ pip install "sqlmesh[postgres]"
1010

1111
### Connection options
1212

13-
| Option | Description | Type | Required |
14-
|-------------------|---------------------------------------------------------------------------------|:------:|:--------:|
15-
| `type` | Engine type name - must be `postgres` | string | Y |
16-
| `host` | The hostname of the Postgres server | string | Y |
17-
| `user` | The username to use for authentication with the Postgres server | string | Y |
18-
| `password` | The password to use for authentication with the Postgres server | string | Y |
19-
| `port` | The port number of the Postgres server | int | Y |
20-
| `database` | The name of the database instance to connect to | string | Y |
21-
| `keepalives_idle` | The number of seconds between each keepalive packet sent to the server. | int | N |
22-
| `connect_timeout` | The number of seconds to wait for the connection to the server. (Default: `10`) | int | N |
23-
| `role` | The role to use for authentication with the Postgres server | string | N |
24-
| `sslmode` | The security of the connection to the Postgres server | string | N |
13+
| Option | Description | Type | Required |
14+
|--------------------|---------------------------------------------------------------------------------|:------:|:--------:|
15+
| `type` | Engine type name - must be `postgres` | string | Y |
16+
| `host` | The hostname of the Postgres server | string | Y |
17+
| `user` | The username to use for authentication with the Postgres server | string | Y |
18+
| `password` | The password to use for authentication with the Postgres server | string | Y |
19+
| `port` | The port number of the Postgres server | int | Y |
20+
| `database` | The name of the database instance to connect to | string | Y |
21+
| `keepalives_idle` | The number of seconds between each keepalive packet sent to the server. | int | N |
22+
| `connect_timeout` | The number of seconds to wait for the connection to the server. (Default: `10`) | int | N |
23+
| `role` | The role to use for authentication with the Postgres server | string | N |
24+
| `sslmode` | The security of the connection to the Postgres server | string | N |
25+
| `application_name` | The name of the application to use for the connection | string | N |
2526

2627
## Airflow Scheduler
2728
**Engine Name:** `postgres`

sqlmesh/core/config/connection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,7 @@ class PostgresConnectionConfig(ConnectionConfig):
11961196
connect_timeout: int = 10
11971197
role: t.Optional[str] = None
11981198
sslmode: t.Optional[str] = None
1199+
application_name: t.Optional[str] = None
11991200

12001201
concurrent_tasks: int = 4
12011202
register_comments: bool = True
@@ -1214,6 +1215,7 @@ def _connection_kwargs_keys(self) -> t.Set[str]:
12141215
"keepalives_idle",
12151216
"connect_timeout",
12161217
"sslmode",
1218+
"application_name",
12171219
}
12181220

12191221
@property

0 commit comments

Comments
 (0)