PostgreSQL dictionary source
Example of settings:
- DDL
- Configuration file
Setting fields:
| Setting | Description |
|---|---|
host | The host on the PostgreSQL server. You can specify it for all replicas, or for each one individually (inside <replica>). |
port | The port on the PostgreSQL server. You can specify it for all replicas, or for each one individually (inside <replica>). |
user | Name of the PostgreSQL user. You can specify it for all replicas, or for each one individually (inside <replica>). |
password | Password of the PostgreSQL user. You can specify it for all replicas, or for each one individually (inside <replica>). |
replica | Section of replica configurations. There can be multiple sections. |
replica/host | The PostgreSQL host. |
replica/port | The PostgreSQL port. |
replica/priority | The replica priority. When attempting to connect, ClickHouse traverses the replicas in order of priority. The lower the number, the higher the priority. |
db | Name of the database. |
table | Name of the table. |
where | The selection criteria. The syntax for conditions is the same as for WHERE clause in PostgreSQL. For example, id > 10 AND id < 20. Optional. |
invalidate_query | Query for checking the dictionary status. Optional. Read more in the section Refreshing dictionary data using LIFETIME. |
background_reconnect | Reconnect to replica in background if connection fails. Optional. |
query | The custom query. Optional. |
Note
The table or where fields cannot be used together with the query field. And either one of the table or query fields must be declared.