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 1vx5tp-00F6Wl-1l for pgsql-admin@arkaria.postgresql.org; Mon, 02 Mar 2026 16:13:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vx5to-001hKO-0B for pgsql-admin@arkaria.postgresql.org; Mon, 02 Mar 2026 16:13:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vx5tn-001hKG-1s for pgsql-admin@lists.postgresql.org; Mon, 02 Mar 2026 16:13:36 +0000 Received: from mail-yx1-xb136.google.com ([2607:f8b0:4864:20::b136]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vx5tm-000000002ZM-0sHK for pgsql-admin@lists.postgresql.org; Mon, 02 Mar 2026 16:13:35 +0000 Received: by mail-yx1-xb136.google.com with SMTP id 956f58d0204a3-64c9cbec9b0so404893d50.1 for ; Mon, 02 Mar 2026 08:13:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772468013; cv=none; d=google.com; s=arc-20240605; b=HQHs5boJBqWgUzdcwKojrqhBbjjeO6nsrM9Ah8HJ9tnJlJVV8WwB4KAfGKPb9W9txh IdR/+Fs3afmB5OPihV4Q5qUiG1FItQkBHr6njovHKujaw4lcTDhWVjJlHJUSnghuOcxG ko8lufG2kPZKL8KczhlYiaV9hknQ1X71fb9Wdp9yvQBYgri30/9jDZAMWLeubKIQYowT HzhoBGG+0dHGZhT2AYyHAtMNp+A9QO+hdGXxWg5WneEzHlk3NTjzzkvKzHv3GHFnWHqB Qcydg0AB/lZ9g0DzNMydLlpKbvR++q6nKsgJmYANnmefwg26avmpDvqP2amkPZDARkZJ D8bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=THHh5NfrTn0hs23WhLSfc/7onIgKOrcwKywZv+kWFbM=; fh=Zvhb1ilBNP8c3ooJFYyrzfmGkY3vUyBgPlguOa0CRvg=; b=SCpNN5bhMd+XKRDmIHMg5UhYGz7Me5wGHG03CFYmWkxu7J8N2shsCrGCg8KEsR3fZQ 4IU92HOQSFjwNHR/vP18+ez/Dry6AzTpVTTdnMBeNQJ0renQ46aUqaEhlFDYKj9gTeA8 ie1V6xwSbHu8UPhM1kHOWXx98bCDH7f+EadxYwSkBh0lilRrh9feP4qfG5nqNxE9DSCJ xLfGTXLkhlydTIcHNgIyzI3bx0IXkhvFBjAApnCfB6llwGVAY7n9ZWvCFcxIfDCtyBva o/7RUgljXIGjGa6XLwamsgw31n3BXB0HtwufaKePhqzwDvoj4JXTC3tBR5RUpO4gNkaC azhQ==; 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=1772468013; x=1773072813; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=THHh5NfrTn0hs23WhLSfc/7onIgKOrcwKywZv+kWFbM=; b=RbvFpbe8tgW0rhizqYqp5UPB596Tdckgc4M5Ds5PqnqeYLzl+WKZNtu/hGCb0bmnI9 65DwWu14T+qPKudVMp0lN3P0We6+Xk+bbNJ2eYfCFlKrHi2qgcu9ussX350If1YKqRN+ VWT7XoStZ+LxSiOOfH6Ml4BIwMuTr2k/tM0jHXl5rs8zvaLT2aK4IjivkAPIKUYRK2pM 45MRyyN0R4QH9JD4CG5pjApGoLlzMkgM+kGdziZQW8ClRkQ7i3VAEwlEqwcvIYY7Cyug X/VOCMd7J7VUJOeGlcI++Lce4G8tVXjD3KI+H09p2RMqdroicaGdY9XPDTJNUtfV6gYx pLXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772468013; x=1773072813; h=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=THHh5NfrTn0hs23WhLSfc/7onIgKOrcwKywZv+kWFbM=; b=F4S14uF7ViV3ykbYotaxVM5XHJHv5Jp5VdaSuh+zAVFCrMqNj73eDdWiy/4fyZpuT8 UKLZGza6udLFa93fVMh4g42r2t0tmFARnjvngrhwFSRuBViQqac7d03D/2PGkjngj+pl XtftIWtOtDfvXFfbcQDoZd5D5XOSpK5khHy/Ovc7PpECeNLFOG8ivdNllRzQseQqE5Fk S6+kNCaASrJV8HG+Fvr1iKIH2JjOJqCQePnJMM3sY+xJl+Gfb+4dkx7LQuR73D0CbqXA 8svMMstnXHi4IyThca0gh1y9uX1moeuL66zhgIWnEk9pQEH/wLEy5gdInv2kRX4yynN5 86ag== X-Gm-Message-State: AOJu0YwKu7OawiZ1ZN9InwVfMOBeDvcmvKu49oiovjcfGdACe6otIwX6 cdJk+rxQO0jM1Roz0aiO6kpgg6s1VNkC2yBZsRLXAV5HRUOhQGb0292LuFBUQwxeGV3l72WFhL6 jfSr0kcePlU7o3JB8t42VD334A35pYAguCaMI X-Gm-Gg: ATEYQzwsPALjZ6fTpxK+dXvUrvlHklgGECzcv1u0+o/u5lNybN7NgYkIvpr3FdaFRlD ilO8W4Tlqe/ZeUK163yx4hqHWTNzsmerGhipqEWNcY8/dklpTikzxDgoqIqMpYmmFgh2Lu2fOyI a5QkGxIIvhoAs3ohDzs+5JBzH/7FYtL2mtJKEZQsYzp+1gZKfjEHvj66GgkSkJTjQknfOz47j/A NaGuBCihlCzMi9liCEhS3EWRhgUqz+tzeNRr22Z0dsmdTUepWlyZUE7AbKbgvaQfxIhLhMH9AYy UH2Ddw== X-Received: by 2002:a05:690e:bca:b0:64a:ce22:530a with SMTP id 956f58d0204a3-64cc22ae0a3mr8458736d50.3.1772468012820; Mon, 02 Mar 2026 08:13:32 -0800 (PST) MIME-Version: 1.0 References: <44166282b3516f33696f025ad9f5271244f78107.camel@cybertec.at> In-Reply-To: From: Fabrice Chapuis Date: Mon, 2 Mar 2026 17:13:22 +0100 X-Gm-Features: AaiRm51q_0U4iQZOVBNAr8i0YA2pRVYkhRb-G_03pE49BzHEbP4SmV6i6mz-8ho 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: Pgsql-admin , Laurenz Albe Content-Type: multipart/alternative; boundary="00000000000047aec5064c0cde0e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000047aec5064c0cde0e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for answering Laurenz, I think the value of max_connections must be aligned with primary because the goal is to maintain this sizing in case of a failover and promotion of the standby. 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. These are the questions I've been asking to myself. On Mon, Mar 2, 2026 at 4:20=E2=80=AFPM Fabrice Chapuis wrote: > Thanks for answering Laurenz, > > I think the value of max_connections must be aligned with primary because > the goal is to maintain this sizing in case of a failover and promotion o= f > the standby. > Why to be conservative with `max_connection` and not with shared buffer? > If we're performing recovery on a machine with significantly fewer CPU an= d > RAM resources than the original server, lowering these parameters could b= e > an option because they reserve memory at starting. > > These are the questions I've been asking to myself. > > On Mon, Mar 2, 2026 at 3:36=E2=80=AFPM Laurenz Albe > wrote: > >> On Mon, 2026-03-02 at 11:27 +0100, Fabrice Chapuis wrote: >> > I got this error from restoring a backup on a recovery machine. >> > I got error about the max_connections that I changed from 350 to 100. >> > in the control file the value is 350 >> > /usr/pgsql-17/bin/pg_controldata -D /pgdata/pgsql/17/main/ | grep >> max_conn >> > max_connections setting: 350 >> > That is the value registered from the primary. But the primary is not >> intended to be connected during this restore. >> > primary_conninfo is desactivated. >> > >> > Is there a trick to change decrease this value and start the instance. >> >> Why bother? >> >> Leave max_connections at 350. >> >> Yours, >> Laurenz Albe >> > --00000000000047aec5064c0cde0e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for answering Laurenz,

I think the value of= max_connections must be aligned with primary because the goal is to mainta= in this sizing in case of a failover and promotion of the standby.
Why t= o be conservative with `max_connection` and not with shared buffer?
If w= e'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.

These are the que= stions I've been asking to myself.

On Mon, M= ar 2, 2026 at 4:20=E2=80=AFPM Fabrice Chapuis <fabrice636861@gmail.com> wrote:
Thanks for answer= ing Laurenz,

I think the value of max_connections must be aligned w= ith primary because the goal is to maintain this sizing in case of a failov= er and promotion of the standby.
Why to be conservative with `max_connec= tion` and not with shared buffer?
If we're performing recovery on a= machine with significantly fewer CPU and RAM resources than the original s= erver, lowering these parameters could be an option because they reserve me= mory at starting.

These are the questions I've been asking to my= self.

On Mon, Mar 2, 2026 at 3:36=E2=80=AFPM Laurenz Albe <laurenz.albe@cyberte= c.at> wrote:
On Mon, 2026-03-02 at 11:27 +0100, Fabrice Chapuis wrote:
> I got this error from restoring a backup on a recovery machine.
> I got error about the max_connections that I changed from 350 to 100.<= br> > in the control file the value is 350
> /usr/pgsql-17/bin/pg_controldata -D /pgdata/pgsql/17/main/ | grep max_= conn
> max_connections setting: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0350
> That is the value registered from the primary. But the primary is not = intended to be connected during this restore.
> primary_conninfo is desactivated.
>
> Is there a trick to change decrease this value and start the instance.=

Why bother?

Leave max_connections at 350.

Yours,
Laurenz Albe
--00000000000047aec5064c0cde0e--