Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w77JC-004yh0-1x for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2026 07:45:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w77JA-001xR1-2t for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2026 07:45:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w77JA-001xQt-1s for pgsql-hackers@lists.postgresql.org; Mon, 30 Mar 2026 07:45:13 +0000 Received: from udcm-wwu2.uni-muenster.de ([128.176.118.28]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w77J8-00000001xQ3-1O5F for pgsql-hackers@lists.postgresql.org; Mon, 30 Mar 2026 07:45:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uni-muenster.de; i=@uni-muenster.de; q=dns/txt; s=uniout; t=1774856711; x=1806392711; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=0DtjlNP6FK/3zExdadI4Dt3XZj1HlNFlaUgdl0YVfII=; b=YBbX7b92d+GW5CgpysfM/b/pjZkV8fzEVBaH8KWJJX95qYu+VKlSEHaH f9DPmZG97nDbc7zp4d/QEUsI4BcxvzJZ33r2rMB5fBrDF6ckJCHNVE9KH nVZ5usepO/Hqx5rbRUFo35TdgCPNyb8c7te54zJ7IiBCcLKv8svLgmuIT 4+lbXTIrM1XRpv5syTT0JwD5X45I+7RTDX5Dn4+cpv1Zked1wXdGxCoeg TXzL7RLvc/aKerLFROo/5jHhgNz20qDloaQ8tBc+zib49MgVYs6NltqXN PBoOp8rtey+uj6bF05+pf4DIATLACOBXzl1+d06x+Kks9OYqT6nDwY/eW A==; X-CSE-ConnectionGUID: 0YQTmTUoQ3yWjCi3pbOD+w== X-CSE-MsgGUID: xUuvbsvIQtuYQxokfTcNaQ== X-IronPort-AV: E=Sophos;i="6.23,149,1770591600"; d="scan'208";a="389157041" Received: from secmail.uni-muenster.de ([128.176.118.4]) by UDCM-RELAY2.UNI-MUENSTER.DE with ESMTP; 30 Mar 2026 09:45:10 +0200 Received: from [192.168.178.27] (dynamic-002-243-208-056.2.243.pool.telefonica.de [2.243.208.56]) by SECMAIL.UNI-MUENSTER.DE (Postfix) with ESMTPSA id 70F4420ADF00; Mon, 30 Mar 2026 09:45:09 +0200 (CEST) Message-ID: Date: Mon, 30 Mar 2026 09:45:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Add max_wal_replay_size connection parameter to libpq To: SATYANARAYANA NARLAPURAM Cc: PostgreSQL Hackers References: <126eb1e4-d98e-4647-b629-517adbcad28e@uni-muenster.de> Content-Language: de-DE, en-GB From: Jim Jones In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Satya On 30/03/2026 01:51, SATYANARAYANA NARLAPURAM wrote: > > What is the expectation from such a routing? Is it for freshness of data > for the client or  > freeing up the standby  from user connections so that it can catch up > with primary? > The paragraph described originally was talking about the freshness. The motivation is closer to the former, but in a specific sense. The concrete situations I have in mind are: * Standbys that are I/O-bound and falling behind on replaying received WAL * Standbys catching up after a pause * Standbys running with recovery_min_apply_delay (intentionally delayed replication). In these cases, the client would read data older than what the standby has already received. Routing around them is what the parameter enables. The parameter does not measure how far the standby is behind the primary -- it only measures locally buffered WAL that hasn't been applied yet. I see I should have been clearer about that in the original email. Let me know if I am missing something here. Thanks! Best, Jim