From b7685eb6bae3994ae8d6066df66bd6fe3e48d7e3 Mon Sep 17 00:00:00 2001 From: anastasia Date: Thu, 11 Nov 2021 16:21:05 +0300 Subject: [PATCH] Enable backpressure --- control_plane/src/compute.rs | 6 +++++- vendor/postgres | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/control_plane/src/compute.rs b/control_plane/src/compute.rs index 282e94aed5..af919ea05f 100644 --- a/control_plane/src/compute.rs +++ b/control_plane/src/compute.rs @@ -289,8 +289,12 @@ impl PostgresNode { conf.append("shared_buffers", "1MB"); conf.append("fsync", "off"); conf.append("max_connections", "100"); - conf.append("wal_sender_timeout", "0"); conf.append("wal_level", "replica"); + // wal_sender_timeout is the maximum time to wait for WAL replication. + // It also defines how often the walreciever will send a feedback message to the wal sender. + conf.append("wal_sender_timeout", "5s"); + conf.append("max_replication_flush_lag", "160MB"); + conf.append("max_replication_apply_lag", "1500MB"); conf.append("listen_addresses", &self.address.ip().to_string()); conf.append("port", &self.address.port().to_string()); diff --git a/vendor/postgres b/vendor/postgres index da7459982c..be8bdba074 160000 --- a/vendor/postgres +++ b/vendor/postgres @@ -1 +1 @@ -Subproject commit da7459982caf933db266109c363b655b5c1be56d +Subproject commit be8bdba074baf2a4c7f8fb2cc701c2b3fac9342f