From 109eb930c4dee8737a7e4e8e07c7d6b68d2a8bc7 Mon Sep 17 00:00:00 2001
From: Hou Zhijie <houzj.fnst@cn.fujitsu.com>
Date: Thu, 22 Feb 2024 20:41:55 +0800
Subject: [PATCH] Make recovery test pass with log_error_verbosity=verbose

Make recovery test pass with log_error_verbosity=verbose

The test added 93db6cb didn't account for the possible presence of an SQL
errror code, which happens if log_error_verbosity is set to 'verbose'. Fix it
by searching only the message part in the test.
---
 src/test/recovery/t/040_standby_failover_slots_sync.pl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/test/recovery/t/040_standby_failover_slots_sync.pl b/src/test/recovery/t/040_standby_failover_slots_sync.pl
index e24009610a..968aa7b05b 100644
--- a/src/test/recovery/t/040_standby_failover_slots_sync.pl
+++ b/src/test/recovery/t/040_standby_failover_slots_sync.pl
@@ -373,7 +373,7 @@ $standby1->append_conf('postgresql.conf', qq(sync_replication_slots = on));
 $standby1->reload;
 
 # Confirm that the slot sync worker is able to start.
-$standby1->wait_for_log(qr/LOG:  slot sync worker started/,
+$standby1->wait_for_log(qr/slot sync worker started/,
 	$log_offset);
 
 $log_offset = -s $standby1->logfile;
@@ -384,9 +384,9 @@ $standby1->reload;
 
 # Confirm that slot sync worker acknowledge the GUC change and logs the msg
 # about wrong configuration.
-$standby1->wait_for_log(qr/LOG:  slot sync worker will restart because of a parameter change/,
+$standby1->wait_for_log(qr/slot sync worker will restart because of a parameter change/,
 	$log_offset);
-$standby1->wait_for_log(qr/LOG:  slot synchronization requires hot_standby_feedback to be enabled/,
+$standby1->wait_for_log(qr/slot synchronization requires hot_standby_feedback to be enabled/,
 	$log_offset);
 
 $log_offset = -s $standby1->logfile;
@@ -396,7 +396,7 @@ $standby1->append_conf('postgresql.conf', "hot_standby_feedback = on");
 $standby1->reload;
 
 # Confirm that the slot sync worker is able to start now.
-$standby1->wait_for_log(qr/LOG:  slot sync worker started/,
+$standby1->wait_for_log(qr/slot sync worker started/,
 	$log_offset);
 
 ##################################################
-- 
2.30.0.windows.2

