@@ -156,17 +156,16 @@ _PG_output_plugin_init(OutputPluginCallbacks *cb)
156156}
157157
158158static void
159- parse_output_parameters (List * options ,uint32 * protocol_version ,
160- List * * publication_names ,bool * binary ,
161- bool * enable_streaming )
159+ parse_output_parameters (List * options ,PGOutputData * data )
162160{
163161ListCell * lc ;
164162bool protocol_version_given = false;
165163bool publication_names_given = false;
166164bool binary_option_given = false;
167165bool streaming_given = false;
168166
169- * binary = false;
167+ data -> binary = false;
168+ data -> streaming = false;
170169
171170foreach (lc ,options )
172171{
@@ -196,7 +195,7 @@ parse_output_parameters(List *options, uint32 *protocol_version,
196195errmsg ("proto_version \"%s\" out of range" ,
197196strVal (defel -> arg ))));
198197
199- * protocol_version = (uint32 )parsed ;
198+ data -> protocol_version = (uint32 )parsed ;
200199}
201200else if (strcmp (defel -> defname ,"publication_names" )== 0 )
202201{
@@ -207,7 +206,7 @@ parse_output_parameters(List *options, uint32 *protocol_version,
207206publication_names_given = true;
208207
209208if (!SplitIdentifierString (strVal (defel -> arg ),',' ,
210- publication_names ))
209+ & data -> publication_names ))
211210ereport (ERROR ,
212211(errcode (ERRCODE_INVALID_NAME ),
213212errmsg ("invalid publication_names syntax" )));
@@ -220,7 +219,7 @@ parse_output_parameters(List *options, uint32 *protocol_version,
220219errmsg ("conflicting or redundant options" )));
221220binary_option_given = true;
222221
223- * binary = defGetBoolean (defel );
222+ data -> binary = defGetBoolean (defel );
224223}
225224else if (strcmp (defel -> defname ,"streaming" )== 0 )
226225{
@@ -230,7 +229,7 @@ parse_output_parameters(List *options, uint32 *protocol_version,
230229errmsg ("conflicting or redundant options" )));
231230streaming_given = true;
232231
233- * enable_streaming = defGetBoolean (defel );
232+ data -> streaming = defGetBoolean (defel );
234233}
235234else
236235elog (ERROR ,"unrecognized pgoutput option: %s" ,defel -> defname );
@@ -244,7 +243,6 @@ static void
244243pgoutput_startup (LogicalDecodingContext * ctx ,OutputPluginOptions * opt ,
245244bool is_init )
246245{
247- bool enable_streaming = false;
248246PGOutputData * data = palloc0 (sizeof (PGOutputData ));
249247
250248/* Create our memory context for private allocations. */
@@ -265,11 +263,7 @@ pgoutput_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt,
265263if (!is_init )
266264{
267265/* Parse the params and ERROR if we see any we don't recognize */
268- parse_output_parameters (ctx -> output_plugin_options ,
269- & data -> protocol_version ,
270- & data -> publication_names ,
271- & data -> binary ,
272- & enable_streaming );
266+ parse_output_parameters (ctx -> output_plugin_options ,data );
273267
274268/* Check if we support requested protocol */
275269if (data -> protocol_version > LOGICALREP_PROTO_MAX_VERSION_NUM )
@@ -295,7 +289,7 @@ pgoutput_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt,
295289 * we only allow it with sufficient version of the protocol, and when
296290 * the output plugin supports it.
297291 */
298- if (!enable_streaming )
292+ if (!data -> streaming )
299293ctx -> streaming = false;
300294else if (data -> protocol_version < LOGICALREP_PROTO_STREAM_VERSION_NUM )
301295ereport (ERROR ,