diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index 9e21d7a7df9..724637cff5b 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -2993,7 +2993,7 @@ check_pub_dead_tuple_retention(WalReceiverConn *wrconn)
 	if (remote_in_recovery)
 		ereport(ERROR,
 				errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-				errmsg("cannot enable retain_dead_tuples if the publisher is in recovery."));
+				errmsg("cannot enable retain_dead_tuples if the publisher is in recovery"));
 
 	ExecDropSingleTupleTableSlot(slot);
 
-- 
2.43.0
