Re: problem during postgres restore: max_connections = 100 is a lower setting than on the primary server, where its value was 350 - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: problem during postgres restore: max_connections = 100 is a lower setting than on the primary server, where its value was 350
Date
Msg-id f393ed522208b1253be393eaf7c66b4637e4d059.camel@cybertec.at
Whole thread Raw
In response to Re: problem during postgres restore: max_connections = 100 is a lower setting than on the primary server, where its value was 350  (Fabrice Chapuis <fabrice636861@gmail.com>)
Responses Re: problem during postgres restore: max_connections = 100 is a lower setting than on the primary server, where its value was 350
List pgsql-admin
On Mon, 2026-03-02 at 17:13 +0100, Fabrice Chapuis wrote:
> 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.

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 = 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 connection pool.

Yours,
Laurenz Albe



pgsql-admin by date:

Previous
From: Fabrice Chapuis
Date:
Subject: Re: problem during postgres restore: max_connections = 100 is a lower setting than on the primary server, where its value was 350
Next
From: Holger Jakobs
Date:
Subject: Re: upgrade from 13 to 16