Cannot lower max_connections in a hot_standby setup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PostgreSQL Charm |
Confirmed
|
High
|
Unassigned |
Bug Description
We reached a situation where raising max_connections is possible, but not the opposite, resulting in a stuck status charm wise.
Scenario:
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.
Changed in postgresql-charm: | |
status: | New → Confirmed |
importance: | Undecided → High |