Cannot lower max_connections in a hot_standby setup

Bug #1946735 reported by Benjamin Allot
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PostgreSQL Charm

Bug Description

We reached a situation where raising max_connections is possible, but not the opposite, resulting in a stuck status charm wise.

1. Set max_connections from 100 to 200
2. Once configured, restore max_connections 100
3. The primary will wait for the secondary to be ready, the secondary will never be able to start because:
2021-10-12 09:34:12 UTC [575611]: [4-1] db=,user= FATAL: hot standby is not possible because max_connections = 100 is a lower setting than on the master server (its value was 200)

Manually disabling the 'hot_standby- settings in postgresql.conf allows for the secondary to start again, to the point where the max_connections settings is synchronized to the same value, but the charm shouldn't proceed automatically and wait for a human action when decreasing this setting.

Tom Haddon (mthaddon)
Changed in postgresql-charm:
status: New → Confirmed
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.