mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
Make error handling of synchronous_standby_names consistent.
It's not a good idea to kill the postmaster just because someone muffs this, and it's not consistent with what we do for other, similar GUCs. Fujii Masao, with a bit more hacking by me
This commit is contained in:
parent
2e019c8611
commit
551c07d84a
@ -420,9 +420,7 @@ SyncRepGetStandbyPriority(void)
|
|||||||
/* syntax error in list */
|
/* syntax error in list */
|
||||||
pfree(rawstring);
|
pfree(rawstring);
|
||||||
list_free(elemlist);
|
list_free(elemlist);
|
||||||
ereport(FATAL,
|
/* GUC machinery will have already complained - no need to do again */
|
||||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
|
||||||
errmsg("invalid list syntax for parameter \"synchronous_standby_names\"")));
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -563,7 +561,7 @@ assign_synchronous_standby_names(const char *newval, bool doit, GucSource source
|
|||||||
/* syntax error in list */
|
/* syntax error in list */
|
||||||
pfree(rawstring);
|
pfree(rawstring);
|
||||||
list_free(elemlist);
|
list_free(elemlist);
|
||||||
ereport(FATAL,
|
ereport(GUC_complaint_elevel(source),
|
||||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||||
errmsg("invalid list syntax for parameter \"synchronous_standby_names\"")));
|
errmsg("invalid list syntax for parameter \"synchronous_standby_names\"")));
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user