Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0038c1e

Browse files
committed
Use ereport(ERROR) instead of Assert() to emit syncrep_parser error.
The existing code would either Assert or generate an invalidSyncRepConfig variable, neither of which is desirable. A regularerror should be thrown instead.This commit silences compiler warning in non assertion-enabled builds.Per report from Jeff Janes.Suggested fix by Tom Lane.
1 parentf73b2bb commit0038c1e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎src/backend/replication/syncrep.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,9 +886,14 @@ SyncRepUpdateConfig(void)
886886
*/
887887
syncrep_scanner_init(SyncRepStandbyNames);
888888
parse_rc=syncrep_yyparse();
889-
Assert(parse_rc==0);
890889
syncrep_scanner_finish();
891890

891+
if (parse_rc!=0)
892+
ereport(ERROR,
893+
(errcode(ERRCODE_SYNTAX_ERROR),
894+
errmsg_internal("synchronous_standby_names parser returned %d",
895+
parse_rc)));
896+
892897
SyncRepConfig=syncrep_parse_result;
893898
syncrep_parse_result=NULL;
894899
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp