v.24.7Improvement

Add PostgreSQL Connection Settings for Timeout and Retries

Add settings to control connections to PostgreSQL. The setting postgresql_connection_attempt_timeout specifies the value passed to connect_timeout parameter of connection URL. The setting postgresql_connection_pool_retries specifies the number of retries to establish a connection to the PostgreSQL end-point. #66232 (Dmitry Novik).
Introduced new settings to control connection behavior to PostgreSQL when using ClickHouse.

Why it matters

These settings address connection reliability and timeout issues by allowing users to configure the connection timeout and the number of retries when establishing connections to PostgreSQL. This improves stability and resilience of integrations between ClickHouse and PostgreSQL endpoints.

How to use it

Users can configure the following settings in ClickHouse:

- postgresql_connection_attempt_timeout: sets the connect_timeout parameter in the PostgreSQL connection URL to specify how long to wait for a connection attempt.
- postgresql_connection_pool_retries: sets the number of retries to attempt when establishing a connection to the PostgreSQL endpoint.

These settings can be applied in the ClickHouse server configuration or session settings as needed.