v.22.1Improvement

Add Retry Logic for PostgreSQL Connections

Add retry for PostgreSQL connections in case nothing has been fetched yet. Closes #33199. #33209 (Kseniia Sumarokova).
Added automatic retry for PostgreSQL connections in ClickHouse when no data is fetched initially.

Why it matters

This feature addresses transient connection or query issues with PostgreSQL sources during data fetching. By retrying the connection if nothing is fetched, it improves reliability and robustness of external data integration, reducing failures caused by temporary connectivity problems.

How to use it

This retry mechanism is enabled automatically for PostgreSQL connections when fetching data. No additional user configuration is needed to benefit from this retry behavior.