invalid value for parameter "synchronized_standby_slots"

Loki 0 Reputation points
2025-10-29T02:25:46.0833333+00:00

Starting early morning today, we started to get the following error

invalid value for parameter "synchronized_standby_slots": "azure_standby_c28cccc6043e, azure_standby_b628528248a6"
DETAIL:  replication slot "azure_standby_b628528248a6" does not exist
CONTEXT:  while setting parameter "synchronized_standby_slots" to "a...

We use Azure Database for PostgreSQL flexible server for our database, I tried restarting the server, changing a no-op server parameter in order to trigger a pg_conf reload but nothing seems to resolve this. Also attaching few things that seems odd based on my google search below

psql -h prod-url.postgres.database.azure.com -p 5432 -U postgres postgres
psql (17.6 (Homebrew))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off, ALPN: postgresql)
Type "help" for help.
postgres=> SHOW synchronized_standby_slots;
               synchronized_standby_slots               
--------------------------------------------------------
 azure_standby_c28cccc6043e, azure_standby_b628528248a6
(1 row)
postgres=> SELECT slot_name, slot_type, active, restart_lsn
FROM pg_replication_slots
WHERE slot_type = 'physical'
ORDER BY slot_name;
                slot_name                | slot_type | active | restart_lsn  
-----------------------------------------+-----------+--------+--------------
 azure_standby_c28cccc6043e              | physical  | t      | 65E/B0053D28
 wal_replica_****_production_tvce | physical  | t      | 65E/B0053D28
(2 rows)
postgres=> SELECT slot_name, slot_type, active, restart_lsn
FROM pg_replication_slots
WHERE slot_type = 'physical'
ORDER BY slot_name;
                slot_name                | slot_type | active | restart_lsn  
-----------------------------------------+-----------+--------+--------------
 azure_standby_c28cccc6043e              | physical  | t      | 65E/B0053D60
 wal_replica_*****_production_tvce | physical  | t      | 65E/B0053D60
(2 rows)
postgres=> SELECT name, setting, pending_restart
FROM pg_settings
WHERE name = 'synchronized_standby_slots';
            name            |                        setting                         | pending_restart 
----------------------------+--------------------------------------------------------+-----------------
 synchronized_standby_slots | azure_standby_c28cccc6043e, azure_standby_b628528248a6 | f
(1 row)
postgres=> WITH s AS (
  SELECT slot_name, restart_lsn
  FROM pg_replication_slots
  WHERE slot_type='physical'
), cur AS (SELECT pg_current_wal_lsn() AS now_lsn)
SELECT s.slot_name,
       s.restart_lsn,
       pg_size_pretty(pg_wal_lsn_diff(cur.now_lsn, s.restart_lsn)) AS wal_to_keep_from_here
FROM s, cur
ORDER BY s.slot_name;
                slot_name                | restart_lsn  | wal_to_keep_from_here 
-----------------------------------------+--------------+-----------------------
 azure_standby_c28cccc6043e              | 65E/B0055700 | 0 bytes
 wal_replica_*****_production_tvce | 65E/B0055700 | 0 bytes
(2 rows)
postgres=> exit;
(venv) lokimacbook % az postgres flexible-server parameter set --resource-group <resource-group> --server-name <server-name> --name synchronized_standby_slots --value ""
(ReadOnlyParameter) Value of server parameter 'synchronized_standby_slots' cannot be set because it's declared as read-only.
Code: ReadOnlyParameter
Message: Value of server parameter 'synchronized_standby_slots' cannot be set because it's declared as read-only.
Azure Database for PostgreSQL
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.