]> granicus.if.org Git - postgresql/commitdiff
Fix logical replication protocol comparison logic
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 15 Aug 2017 20:20:20 +0000 (16:20 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 15 Aug 2017 20:20:20 +0000 (16:20 -0400)
Since we currently only have one protocol, this doesn't make much of a
difference other than the error message.

Author: Yugo Nagata <nagata@sraoss.co.jp>

src/backend/replication/pgoutput/pgoutput.c

index 4a5628888a2429e47246e3762b964b095020d449..370b74f23278fcf4c0558ed41985e1c52d8ff870 100644 (file)
@@ -173,7 +173,7 @@ pgoutput_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt,
                                                                &data->publication_names);
 
                /* Check if we support requested protocol */
-               if (data->protocol_version != LOGICALREP_PROTO_VERSION_NUM)
+               if (data->protocol_version > LOGICALREP_PROTO_VERSION_NUM)
                        ereport(ERROR,
                                        (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                                         errmsg("client sent proto_version=%d but we only support protocol %d or lower",