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.98.2) (envelope-from ) id 1xMPEz-000000020fF-32bp for pgsql-general@arkaria.postgresql.org; Thu, 29 Oct 2026 12:28:22 +0000 Received: from localhost ([127.0.0.1]:59044 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xMPEy-00000004P5K-1cZM for pgsql-general@arkaria.postgresql.org; Thu, 29 Oct 2026 12:28:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]:43134) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xMPC4-00000004LdY-0bqB for pgsql-general@lists.postgresql.org; Thu, 29 Oct 2026 12:25:20 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1xMPBx-00000001WiB-23OO for pgsql-general@lists.postgresql.org; Thu, 29 Oct 2026 12:25:14 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4a35db1f202so16000745e9.3 for ; Thu, 29 Oct 2026 05:25:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1793276711; x=1793881511; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:to:from:subject:message-id:from:to:cc :subject:date:message-id:reply-to:content-type; bh=afZzU6XelDRE6EjcY4a4vBnrGFhXzMeK/dwKEL8ITto=; b=sbHQjNtV3gamI/yyv31ePTpf6/fo/Qd/O4UmvSc7hmd3OX1oIh5Lu+D83fkeDBfkoq R/FwxGVvIXu+ht9HsPDcOI+6toc29e6zE7W1zHsCLuqzyqIJaDNXEo55xRY1qo4b3x8i TqBbrBdxq51Fm+dRa6ON3rCAMRi6+0UY9MYh2wEK0cDiXDMHTavOQvwz/uy0wN2lD0Pj kyF8jCrSHaFnk876NYlMgUOf2EJ+nUoWECVJHBaT4e5/os77sRnhrSuo8beD0kAwn7vj +bNVv7IVABMy91pr/igeW7037MSJZOdzFrkF4E2UwMUtfq+5yTGBUF1nFzETKuUSTGLq gxoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793276711; x=1793881511; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=afZzU6XelDRE6EjcY4a4vBnrGFhXzMeK/dwKEL8ITto=; b=dprn501E6KD1a5nrcmMMILwIjRhZ24w2qaaDqqK4Mz5qZVWK5RHaIvRn7pDD3Oz3Tw zZNAOxhGLwRavYlorwASWP4/fDTvFuXbJS9WHY5TWc1rJx7KA1AJgKWrrKpfLsULpBEy sl9028cb7ecxyPwIvK00u/S7aPogd4fmE/3avyWnZQCnV+05e7qLebL/G/sDPpXeCmfQ pyfLhM1Uxis/m3/ZQB8RzxlM1V1M8iRB+LUlkUpdhsnFwSdKh42nBU3tdzCoenX1buTY vpK5gmbyhHIMjHmEttpj9wED1G8wOcjPOgJXmjE4jJcYDYmN2C5VaztGZZZSVi58R6nu oWOQ== X-Forwarded-Encrypted: i=1; AKwUvBwRscDxuP+7/28d/gIMcb++pOugb3O6sysz1egaHNJknyy04aVezGWWzzK+0VngHYJr8rMtoNEpyxTAydIr@lists.postgresql.org X-Gm-Message-State: AFq9FYIUOwbjLwN9uI9KYa+CkDDmYry/lkZbHA98nzLPipKqThTiix4x 4hAxN9WkUBigmNm9krv4ABpqWm0QwTBdK8xMe1j889AR3LCRrNolrp6rQd4tMW3+vLMzW5TLLT7 qZfoKoQU= X-Gm-Gg: AYBFou03Lpu/ZX8sAC3iTVg/LejaDDPhvWky14Ga8IUQC6n5UaB2tltuas+Y3PS819x 4oDGdFzMtC1cbs9zwiobsdw/MOH/A4YF5rQF/6k9YxfvxLBumxel5YKmoTbarQZOlxQScGjsdG9 JxRfHoidrWx/hkYuoWtlhBf/gwohvWyIDorBGrJBFlUR3EIvvRoGPYS4szZJ0ERzHvhTHHNe/Rv yKvXCXGloVLAtmRtMObfunPMWcvQ49uFbCCpuwyKe0qECKORtn7NpXLFiAieeKlo8GfjToNSmJu 16u6NmJQu+Q94ZiAmhg5u6r5i/OLQdB0oCXvCmQWHqOJrE/kZzDf5IeJvaFEeau2DPuEceq/Jpk GW/PHQQYpvijYXoUPUfYmg4mKDEaosKCYUOvpTer1/fMHbyI7VaW6HqzANoq5L79moRNtRMQz+u sUMXWxFm+VeGB0YHxyBJcJk8oupN6JNvqOHR7pr1SCz372SL8YpejEz9guaWEDak0+BKtromABC fS7rMLTLU7r1BuhQCQLj3hxiV8XPKQZnKRRAuj2ptp61Wst0kdiPvG41Jccws+lrw5U1Dub7zkh AktBiRAPc1rizSleDDhtFpZ4BiZQZdps/sXWSA/GcvKCzcF5HWpmv/UOXw== X-Received: by 2002:a05:600c:19c6:b0:4a1:d537:1c8d with SMTP id 5b1f17b1804b1-4a966c4057cmr122115255e9.19.1793276710839; Thu, 29 Oct 2026 05:25:10 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:70:e46c:84c4:a7c4:977:b141]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4aa7f4188f4sm59790135e9.4.2026.10.29.05.25.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2026 05:25:10 -0700 (PDT) Message-ID: <0e1edf6b16a2ed04672e1802de416b300cf9dea3.camel@cybertec.at> Subject: Re: max_standby_streaming_delay or hot_standby_feedback From: Laurenz Albe To: Troels Arvin , "pgsql-general@lists.postgresql.org" Date: Thu, 29 Oct 2026 13:25:09 +0100 In-Reply-To: <140108b8-2861-4d98-ba14-a7a6d8f3be78@arvin.dk> References: <140108b8-2861-4d98-ba14-a7a6d8f3be78@arvin.dk> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.2 (3.60.2-2.fc44) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2026-10-29 at 10:45 +0100, Troels Arvin wrote: > I have a setup with a rather busy and semi-large primary Postgres server= =20 > which uses physical streaming replication to a secondary server. The=20 > secondary server is to be used for read-only queries (reporting), and=20 > I've starting running pg_dumps towards the secondary. >=20 > I now run into error messages like the following when pg_dump works=20 > against the secondary: >=20 > pg_dump: error: Dumping the contents of table "sometable" failed:=20 > PQgetResult() failed. > pg_dump: detail: Error message from server: ERROR: canceling statement= =20 > due to conflict with recovery > DETAIL: User query might have needed to see row versions that must be=20 > removed. > pg_dump: detail: Command was: COPY someschema.sometable (col1, col2,=20 > col3) TO stdout; >=20 > I have tried setting > max_standby_streaming_delay =3D 5min > (Default is 30s.)=C2=A0That doesn't help. >=20 > I'm wondering: Should I further raise=C2=A0max_standby_streaming_delay, f= or=20 > example to 30min? >=20 > Or should I set hot_standby_feedback to "on"?=20 If these are reporting queries, delaying replay is fine. So set "max_standby_streaming_delay" to -1, that will avoid query cancellat= ion. Don't enable "hot_standby_feedback", otherwise reporting queries on the sta= ndby can bloat tables on your primary. Yours, Laurenz Albe