pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hugo DUBOIS <hdubois@scaleway.com>
To: pgsql-bugs@lists.postgresql.org
Subject: Unexpected Standby Shutdown on sync_replication_slots change
Date: Thu, 24 Jul 2025 15:54:00 +0200
Message-ID: <CAH0PTU_pc3oHi__XESF9ZigCyzai1Mo3LsOdFyQA4aUDkm01RA@mail.gmail.com> (raw)

Hello,

I'm not sure if it's a bug but I've encountered an unexpected behavior when
dynamically changing the sync_replication_slots parameter on a PostgreSQL
17 standby server. Instead of logging an error and continuing to run, the
standby instance shuts down with a FATAL error, which is not the
anticipated behavior for a dynamic parameter change, especially when the
documentation doesn't indicate such an outcome.

Steps to Reproduce


   1.

   Set up a physical replication between two PostgreSQL 17.5 instances.
   2.

   Ensure wal_level on the primary (and consequently on the standby) is set
   to replica.
   3.

   Start both the primary and standby instances, confirming replication is
   active.
   4.

   On the *standby* instance, dynamically change the sync_replication_slots
   parameter (I have run the following query: ALTER SYSTEM SET
   sync_replication_slots = 'on'; followed by SELECT pg_reload_conf();)

Expected Behavior

I expected the standby instance to continue running and log an error
message (similar to how hot_standby_feedback behaves when not enabled,
e.g., a loop of LOG: replication slot synchronization requires
"hot_standby_feedback" to be enabled). A FATAL error leading to an
unexpected shutdown for a dynamic parameter change on a running standby is
not the anticipated behavior. The documentation for sync_replication_slots
also doesn't indicate that a misconfiguration or incompatible wal_level
would lead to a shutdown.

Actual Behavior

Upon attempting to set sync_replication_slots to on on the standby with
wal_level set to replica, the standby instance immediately shuts down with
the following log messages:

LOG:  database system is ready to accept read-only connections
LOG:  started streaming WAL from primary at 0/3000000 on timeline 1
LOG:  received SIGHUP, reloading configuration files
LOG:  parameter "sync_replication_slots" changed to "on"
FATAL:  replication slot synchronization requires "wal_level" >= "logical"

Environment


   -

   *PostgreSQL Version:* 17.5

view thread (21+ messages)  latest in thread

Message-ID: <CAH0PTU_pc3oHi__XESF9ZigCyzai1Mo3LsOdFyQA4aUDkm01RA@mail.gmail.com>
Permalink:  ../CAH0PTU_pc3oHi__XESF9ZigCyzai1Mo3LsOdFyQA4aUDkm01RA@mail.gmail.com/
Also on:    postgresql.org/message-id/CAH0PTU_pc3oHi__XESF9ZigCyzai1Mo3LsOdFyQA4aUDkm01RA@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: hdubois@scaleway.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: Unexpected Standby Shutdown on sync_replication_slots change
  In-Reply-To: <CAH0PTU_pc3oHi__XESF9ZigCyzai1Mo3LsOdFyQA4aUDkm01RA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox