8000 Multimaster init_cluster() with empty nodes list: replace assertion w… · postgrespro/mmts@dceff14 · GitHub
[go: up one dir, main page]

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

Appearance settings

Commit dceff14

Browse files
Andrei KrichininMikhail Rutman
Andrei Krichinin
authored and
Mikhail Rutman
committed
Multimaster init_cluster() with empty nodes list: replace assertion with error report.
Tags: multimaster.
1 parent ef0c766 commit dceff14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/multimaster.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,8 @@ mtm_init_cluster(PG_FUNCTION_ARGS)
933933

934934
/* parse array with peer connstrings */
935935
Assert(ARR_ELEMTYPE(peers_arr) == TEXTOID);
936-
Assert(ARR_NDIM(peers_arr) == 1);
936+
if (ARR_NDIM(peers_arr) != 1)
937+
mtm_log(ERROR, "node list should not be empty");
937938
deconstruct_array(peers_arr,
938939
TEXTOID, -1, false, 'i',
939940
&peers_datums, &peers_nulls, &n_peers);

0 commit comments

Comments
 (0)
0