Use non -blocking mode for compute<->PS protocol

This commit is contained in:
Konstantin Knizhnik
2025-03-23 18:53:34 +02:00
parent cfbe7a0b3f
commit d7f7d33b0e

View File

@@ -727,6 +727,8 @@ pageserver_connect(shardno_t shard_no, int elevel)
* will do fast retries again, with exponential backoff.
*/
shard->delay_us = MIN_RECONNECT_INTERVAL_USEC;
if (!PQsetnonblocking(shard->conn, true) == -1)
neon_shard_log(shard_no, WARNING, "libpagestore: failed to switch connection to '%s' in non blocking mode: %m", connstr);
neon_shard_log(shard_no, DEBUG5, "Connection state: Connected");
neon_shard_log(shard_no, LOG, "libpagestore: connected to '%s' with protocol version %d", connstr, neon_protocol_version);