Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uewOp-00GwZo-N1 for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Jul 2025 13:54:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uewOo-008BOW-M7 for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Jul 2025 13:54:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uewOo-008BOO-6E for pgsql-bugs@lists.postgresql.org; Thu, 24 Jul 2025 13:54:18 +0000 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uewOl-000YpK-0w for pgsql-bugs@lists.postgresql.org; Thu, 24 Jul 2025 13:54:17 +0000 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-32cd0dfbdb8so9568371fa.0 for ; Thu, 24 Jul 2025 06:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scaleway.com; s=google; t=1753365252; x=1753970052; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=LWV+6V4Wz0GNzCqXwXdxxxj2Hl6N8kG65fl5iP42558=; b=IszPxpeDNuxSX9Kp1e4tvyoFPxFk1jaDDMQ2DLaBMl4IJPm6mAVmaH9uHgLxe4M3g7 q0Qpk15obdWXDEkKV+bZsc83/ZPESQQ3qI2Ea+H8NwVD0+XnNCMANMG5sha4jBqc2zSK aB3cQDp2o+3/EfJRaAHQLMAMglSoXmUhUulDjmuVVgwqmkHK05wnjBtXc1tt+g/74MV4 39KNxFLWYs+PFlSs0FhZP8F0f241T+9cNS7Swk/mFzaFHq/CVfwxYofdPqXnJPaje5yF lebYQSkEroDLF4jlzVg2ELhvwlTaBhsIi1ONdN1fLYx1fou5xBQSJZWB8Rr6c1rl3UF5 uYMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753365252; x=1753970052; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=LWV+6V4Wz0GNzCqXwXdxxxj2Hl6N8kG65fl5iP42558=; b=CggVQ0lKYtJfP9Y+Pe3OL5lDBnjXKLfDaIpn3HTPeLzHsSgiAma5HU6EdGe1VgnfLT wN6yTwsDzdeE5ch//w7zHliSSG2DQxQHFG5A1Zc0dhSp4NUqrOTQmCNcAozgxVmtYeTZ BtgmVL6awOdQaXAROoL7JiEcgT0rvXQHaJmW0BhyPdSC8SI/NmT4PY16QxZ3d0eZ4K0S keORlM+/hAFumUmBW5B5dvTOoGttKVhaMqMzQGZ7t1LKJTzaHfdUcX4sPm3fBiSjHzXw g6m3FPQVvHoOfAlamU+CjlsmydgT5XzzRx4fuG9uL1AuWR0shhDyfOrESypotFr3edIA EaQA== X-Gm-Message-State: AOJu0YzcV2wq4VDIpIr28swJi6f2/qeJQBdrjM1gKsU2lFNzww9/2Ie8 v+msqeCsjAJrPyUjXFjZjuaHq/hOCEl2tXU3hYV6tmgTTs9wBTUTzmB8t2tEgaE06TKQezhn6cy dAUx/i4nygdBzn0e6mJhjhKSTKDc0rrahJtNuKTk8msH/Zqa0V35ZBcY= X-Gm-Gg: ASbGncvUWnBmB7H9YVGpzFR6TGJow27+C6cR/OsZ6F/6Yo9tkEuqy6RaLc6d510JmgY LGoW4It47H02nPuE3maWzNEZdTjaSJKAI4+DAlwGGWi4Gkfm+khRtl/zMGtUnxmj/XiG6mR0TEP XyDQRNi5XtFLRsTEpQRxHQYi9cFRWoR3nNVwxcbS6Jqjdi4gtYf2AwnjQxGMkaJc9y6eUtp7tcU oeV6yyzXEZwUwuAKV8RuV8vZhL0uPPS X-Google-Smtp-Source: AGHT+IGPFzaG1OtziHdnBp/NyzsyiNODmaJVPDLAzw3hTjV4bMxYcHT9aqXuzO2FOILXvA/ZzAx2HxJiv1BiAXNymHs= X-Received: by 2002:a2e:a58d:0:b0:32f:45e5:df46 with SMTP id 38308e7fff4ca-330dfe68d27mr22052741fa.37.1753365251670; Thu, 24 Jul 2025 06:54:11 -0700 (PDT) MIME-Version: 1.0 From: Hugo DUBOIS Date: Thu, 24 Jul 2025 15:54:00 +0200 X-Gm-Features: Ac12FXwu8YxlLbMZGniZmiXjE4aoHoGDnx6G07uy_A_IHZxjLeHVVEAyu6qVTv0 Message-ID: Subject: Unexpected Standby Shutdown on sync_replication_slots change To: pgsql-bugs@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000fcdd73063aad286e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000fcdd73063aad286e Content-Type: text/plain; charset="UTF-8" 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 --000000000000fcdd73063aad286e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hello,

I'm not sure if it's a bug bu= t I've encountered an unexpected behavior when dynamically changing the= sync_replication_slots parameter on a PostgreSQL 17 standby s= erver. Instead of logging an error and continuing to run, the standby insta= nce shuts down with a FATAL error, which is not the anticipate= d behavior for a dynamic parameter change, especially when the documentatio= n doesn't indicate such an outcome.

Steps to Reproduce

  1. Set up a physical replication between two P= ostgreSQL 17.5 instances.

  2. Ensure wal_level on t= he primary (and consequently on the standby) is set to replica= .

  3. Start both the primary and standby instances, confirming r= eplication is active.

  4. On the standby instance, dynami= cally change the sync_replication_slots parameter (I have run = the following query:=C2=A0ALTER SYSTEM SET sync_replication_slots =3D= 'on'; followed by SELECT pg_reload_conf();)

Expected Behavior

I expected the standb= y instance to continue running and log an error message (similar to how hot_standby_feedback behaves when not enabled, e.g., a loop of=C2= =A0LOG: replication slot synchronization requires "hot_standby_f= eedback" 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_replicati= on_slots also doesn't indicate that a misconfiguration or incomp= atible wal_level would lead to a shutdown.

Actua= l Behavior

Upon attempting to set sync_replication_slot= s to on on the standby with wal_level set = to replica, the standby instance immediately shuts down with t= he 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" >=
;=3D "logical"

Environment

=

  • PostgreSQL Version: 17.5

--000000000000fcdd73063aad286e--