AW: 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 Patolla Bernd
Subject AW: problem during postgres restore: max_connections = 100 is a lower setting than on the primary server, where its value was 350
Date
Msg-id ZRAP278MB02051BD10306ED17E39CA4988C7EA@ZRAP278MB0205.CHEP278.PROD.OUTLOOK.COM
Whole thread Raw
In response to 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>)
List pgsql-admin
Hi, 

In the past we had this issue, too.
Therefore, we scan the control file and set the values from the control file into the postgresql.auto.conf file. 
Then we started postgres for recovery, stopped it and set the values to the planned ones. 
max_connections and max_worker_processes are the critical parameters to consider in such a scenario.

BR Bernd

 

Von: Fabrice Chapuis <fabrice636861@gmail.com>
Datum: Montag, 2. März 2026 um 11:57
An: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Betreff: problem during postgres restore: max_connections = 100 is a lower setting than on the primary server, where its value was 350

Hi,
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.

Thanks for your help

Fabrice

2026-03-02 11:14:30.353 CET [1620147]: [3-1] user=,db=,client=,application= LOG:  starting PostgreSQL 17.7 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11), 64-bit              
2026-03-02 11:14:30.354 CET [1620147]: [4-1] user=,db=,client=,application= LOG:  listening on IPv4 address "0.0.0.0", port 5432                                                                                  
2026-03-02 11:14:30.354 CET [1620147]: [5-1] user=,db=,client=,application= LOG:  listening on IPv6 address "::", port 5432                                                                                      
2026-03-02 11:14:30.355 CET [1620147]: [6-1] user=,db=,client=,application= LOG:  listening on Unix socket "/run/postgresql/.s.PGSQL.5432"                                                                        
2026-03-02 11:14:30.357 CET [1620147]: [7-1] user=,db=,client=,application= LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"                                                                                  
2026-03-02 11:14:30.362 CET [1620154]: [1-1] user=,db=,client=,application= LOG:  database system was interrupted; last known up at 2026-02-25 18:00:01 CET                                                      
2026-03-02 11:14:30.362 CET [1620154]: [2-1] user=,db=,client=,application= LOG:  creating missing WAL directory "pg_wal/summaries"                                                                              
ERROR: The required file is not available: 0000000A.history
2026-03-02 11:14:31.415 CET [1620154]: [3-1] user=,db=,client=,application= LOG:  starting backup recovery with redo LSN 3FB0/D9000028, checkpoint LSN 3FB0/D9010058, on timeline ID 9                            
2026-03-02 11:14:32.013 CET [1620154]: [4-1] user=,db=,client=,application= LOG:  restored log file "00000009.history" from archive                                                                              
2026-03-02 11:14:32.748 CET [1620154]: [5-1] user=,db=,client=,application= LOG:  restored log file "0000000900003FB0000000D9" from archive                                                                      
2026-03-02 11:14:32.749 CET [1620154]: [6-1] user=,db=,client=,application= LOG:  starting point-in-time recovery to 2026-03-02 09:00:00+01                                                                      
2026-03-02 11:14:32.760 CET [1620154]: [7-1] user=,db=,client=,application= LOG:  recovered replication state of node 1 to 3FB0/D8D74100                                                                          
2026-03-02 11:14:32.761 CET [1620154]: [8-1] user=,db=,client=,application= LOG:  recovered replication state of node 2 to 3FB0/BB7C1518                                                                          
2026-03-02 11:14:32.761 CET [1620154]: [9-1] user=,db=,client=,application= LOG:  recovered replication state of node 3 to 3CBD/DDE26700                                                                          
2026-03-02 11:14:32.761 CET [1620154]: [10-1] user=,db=,client=,application= FATAL:  recovery aborted because of insufficient parameter settings                                                                  
2026-03-02 11:14:32.761 CET [1620154]: [11-1] user=,db=,client=,application= DETAIL:  max_connections = 100 is a lower setting than on the primary server, where its value was 350.                              
2026-03-02 11:14:32.761 CET [1620154]: [12-1] user=,db=,client=,application= HINT:  You can restart the server after making the necessary configuration changes.                                                  
2026-03-02 11:14:32.762 CET [1620147]: [8-1] user=,db=,client=,application= LOG:  startup process (PID 1620154) exited with exit code 1                                                                          
2026-03-02 11:14:32.763 CET [1620147]: [9-1] user=,db=,client=,application= LOG:  aborting startup due to startup process failure                                                                                
2026-03-02 11:14:32.763 CET [1620147]: [10-1] user=,db=,client=,application= LOG:  database system is shut down                                                   

pgsql-admin by date:

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