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 1vxL6Y-009Cin-2W for pgsql-admin@arkaria.postgresql.org; Tue, 03 Mar 2026 08:27:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vxL6W-005ukU-3C for pgsql-admin@arkaria.postgresql.org; Tue, 03 Mar 2026 08:27:45 +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 1vxL6W-005ukM-23 for pgsql-admin@lists.postgresql.org; Tue, 03 Mar 2026 08:27:45 +0000 Received: from mail-yx1-xb12c.google.com ([2607:f8b0:4864:20::b12c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vxL6U-000000009RN-3dzV for pgsql-admin@lists.postgresql.org; Tue, 03 Mar 2026 08:27:44 +0000 Received: by mail-yx1-xb12c.google.com with SMTP id 956f58d0204a3-64c9cbec9b0so448380d50.1 for ; Tue, 03 Mar 2026 00:27:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772526461; cv=none; d=google.com; s=arc-20240605; b=O6GyVTFAYrqHBHbapb39CFAdJMxwkOtDsfbsS/2ep4EPSr0x22ijm6f2cJQHqbWENY 4xVOE37LkbycN6XEUkMrLsCXCGuCoebKKgTkpkGU2MXqdlC+y1w9amkI2Flv5W96vanL 7CLjKFxus7LLc4siG+sm30il/Sbu41O5mG5KeGydafNKQ+MqrRDN1jqufDcv9ltOO1NU ls5D0imLnEAXVXcbiKJw2VFAPHQwMCJ8ulUwJz8PnFyNbymooVYCoBguo9y/Oi7+iJNc anPp8KixrYgxPT3RPOjOBSPRmn96dVKrZ6tOg0HTNzi9NEPQv0ILViFwnhcGgV0iplyr MzRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=mss+YtJagl5vfgD/vxN4Ubx5DyPGmUAtt4nAEsHek2o=; fh=w+NdVitGKczCsjwXWKDGhV4AmoWb4l6r06tzxs/Zo9k=; b=HZo74zOP4T5VamNnRvyX1YhDhq9OWBPaGVU551CXjBSJzhrbuoso9z4Tg+J+/S4kmA w86aWzIpPbPc44s6+GFUoPtvf/2UuYnokEV/SSzfkerZtoBsHnRJRrSTP+JI3tgT6KOQ msXo7ZniN4JziOKBdNYW9Fps/uyfYmQA7LXam5cvPGr4f+Ay5UiUyoqAzs+X/+gi5mbU prsXWhNqUmGqMiFnUy7j1zNnQcCsifUSdXcGtgsv719oLtL8Byje/l84Ifm/faACrMRA 7l/sj1YpFm6EJPJ2oGlMHbxRfpPdzhY+7+hihSBCssLZ0I1annuQvf5ANSQPGBAMKeCA XXxA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772526461; x=1773131261; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=mss+YtJagl5vfgD/vxN4Ubx5DyPGmUAtt4nAEsHek2o=; b=TDg7phBDj/CEnHclnorn97294zihD8n5fUDRUnryhAsUnVQEhKNOkW8gZVQhCLhdEU YvfwqOxV4sFOpc361M2vHYmewZV+zizrO+DP6+/s/otg69lXEPs4S6DqZTi+oMtGdO2s t2emhptIF/2Syq28GgBG08prlX4Qd3spjjCYM8KxXU3Otx6QlMiW4IAf3ijQJEjogUIW vGJPCpKxqOIGi0sxiKA5d2f0o58Ag5rgpOVwXkRPOUUdJ8Dddt5JEzb/2brLgdRZpiW8 EexezP7GQQy8EN/1+rIcr6kybeljhX7zVNHqFqFUF3pY71tFSlXgEqirv13GiPNl/E/A 60LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772526461; x=1773131261; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mss+YtJagl5vfgD/vxN4Ubx5DyPGmUAtt4nAEsHek2o=; b=aSV4yMBJKkgOdmwZFJLsX2GGoayXbzObPZ348AbNf5Yxw2A64WAOSRbCIOGz3GegQN 00tlSok0GLZFTGelTTqvtSOa9VDsGpvxmWjI7o7zzMrACr4/rVYI5JXnN6ZchkWYZIER xlsJHVq9QaZwQbFywCloBe44/X3r/InfUzW2lFfeqhiJon9DeHAOzuiTcr3hF0xkYaX0 NPRjrLrxtWmab5R8GInOyANRsmk4OtkBc4bo05H15NoOU4FTgGll3pEtlSrUY24lqHuq AEuZ6bLzktb552iPPkAlm6D/2c3YtUQH4ikWbNClO7N3UUZSI2uS527x3asNyoHOYRH5 MR0g== X-Gm-Message-State: AOJu0Yxzar/7ixUoEPUJIlWNbkMWbmxehr+gYtqYy5RDCy+l1OFxku4Y qMt3qa49nzjTQYQRLUVQ1UxqrsNqkGW4SaQhu7iWGziM+eXnlzEnBuufyS1CI14cnsTBt22Ewr5 z6jg3hf6NMCiR9BVbrxdCuYNgUajqDYs= X-Gm-Gg: ATEYQzwMWAZTAp6DrnKQNWoOB7MqKp9ixedH6qlEabzuOpTQksTuHPXBSlzPwnYHQaE Z2iImFQrzf4wXnGJZqSTUI6nfWzMbv7rIwgfVedY/aKcUjBNjHLt/iMunMgSnwUgi7j7Rtv5XAX tbCsbSIL6nWBZsdGJVU/FoI1HWhAI1kGYjhu9QBqGtTSXC+URzFWR80PKCwnCiN8HS2IZ7LLU56 UbF5Jyp9qTpyonE85YRHCNmNH8/m/ZUOxdiVoSjjTupLXpYskPlzKv5ix70RGP20dl5xEMPCobf ZHf3rg== X-Received: by 2002:a53:ac81:0:b0:64a:eda9:8ea7 with SMTP id 956f58d0204a3-64cc22acb98mr11574683d50.4.1772526460975; Tue, 03 Mar 2026 00:27:40 -0800 (PST) MIME-Version: 1.0 References: <44166282b3516f33696f025ad9f5271244f78107.camel@cybertec.at> In-Reply-To: From: Fabrice Chapuis Date: Tue, 3 Mar 2026 09:27:29 +0100 X-Gm-Features: AaiRm50p0nj6SxK_qGwsKmQYmAJxNHTJdfilqcZvEqilsY3VGMqw5IK_81RgAqQ Message-ID: Subject: Re: problem during postgres restore: max_connections = 100 is a lower setting than on the primary server, where its value was 350 To: Laurenz Albe Cc: Pgsql-admin Content-Type: multipart/alternative; boundary="0000000000000fbdf2064c1a7aff" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000000fbdf2064c1a7aff Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable pooling is a good point. Regards, Fabrice On Mon, Mar 2, 2026 at 6:42=E2=80=AFPM Laurenz Albe wrote: > On Mon, 2026-03-02 at 17:13 +0100, Fabrice Chapuis wrote: > > I think the value of max_connections must be aligned with primary becau= se > > the goal is to maintain this sizing in case of a failover and promotion > of the standby. > > Not every standby is for failover. > The technical reason is that the process array on the standby has to be a= t > least > as big as on the primary (if you are setting "hot_standby =3D on"). > > > Why to be conservative with `max_connection` and not with shared buffer= ? > > If we're performing recovery on a machine with significantly fewer CPU > and RAM > > resources than the original server, lowering these parameters could be > an option > > because they reserve memory at starting. > > Perhaps, but you cannot do it. If that is a requirement, use a connectio= n > pool. > > Yours, > Laurenz Albe > --0000000000000fbdf2064c1a7aff Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
pooling is a good point.=C2=A0

Regards,=

Fabrice

On Mon, Mar 2,= 2026 at 6:42=E2=80=AFPM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Mon, 2026-03-02 at 17:13 +0100, Fabri= ce Chapuis wrote:
> I think the value of max_connections must be aligned with primary beca= use
> the goal is to maintain this sizing in case of a failover and promotio= n of the standby.

Not every standby is for failover.
The technical reason is that the process array on the standby has to be at = least
as big as on the primary (if you are setting "hot_standby =3D on"= ).

> Why to be conservative with `max_connection` and not with shared buffe= r?
> If we're performing recovery on a machine with significantly fewer= CPU and RAM
> resources than the original server, lowering these parameters could be= an option
> because they reserve memory at starting.

Perhaps, but you cannot do it.=C2=A0 If that is a requirement, use a connec= tion pool.

Yours,
Laurenz Albe
--0000000000000fbdf2064c1a7aff--