Return_immediately_if_promote_requested.patch

text/x-patch

Filename: Return_immediately_if_promote_requested.patch
Type: text/x-patch
Part: 0
Message: Re: pg_get_wal_replay_pause_state() should not return 'paused' while a promotion is ongoing.

Patch

Format: unified
File+
src/backend/access/transam/xlog.c 2 0
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 8d163f1..1d81c23 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6358,6 +6358,8 @@ RecoveryRequiresIntParameter(const char *param_name, int currValue, int minValue
 										   minValue),
 								 errhint("Restart the server after making the necessary configuration changes.")));
 					warned_for_promote = true;
+
+					return;
 				}
 
 				/*