Fix logical replication protocol comparison logic

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>
This commit is contained in:
Peter Eisentraut 2017-08-15 16:20:20 -04:00
parent 34a23a3426
commit 70b573b267

View 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",