summaryrefslogtreecommitdiff
path: root/src/backend/access
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access')
-rw-r--r--src/backend/access/transam/xlogrecovery.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c
index 52ff4d119e6..3e3c4da01a2 100644
--- a/src/backend/access/transam/xlogrecovery.c
+++ b/src/backend/access/transam/xlogrecovery.c
@@ -4761,9 +4761,20 @@ RecoveryRequiresIntParameter(const char *param_name, int currValue, int minValue
bool
check_primary_slot_name(char **newval, void **extra, GucSource source)
{
+ int err_code;
+ char *err_msg = NULL;
+ char *err_hint = NULL;
+
if (*newval && strcmp(*newval, "") != 0 &&
- !ReplicationSlotValidateName(*newval, false, WARNING))
+ !ReplicationSlotValidateNameInternal(*newval, false, &err_code,
+ &err_msg, &err_hint))
+ {
+ GUC_check_errcode(err_code);
+ GUC_check_errdetail("%s", err_msg);
+ if (err_hint != NULL)
+ GUC_check_errhint("%s", err_hint);
return false;
+ }
return true;
}