Hi, I found a suspicious code in pgoutput_startup().
175 /* Check if we support requested protocol */ 176 if (data->protocol_version != LOGICALREP_PROTO_VERSION_NUM) 177 ereport(ERROR, 178 (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), 179 errmsg("client sent proto_version=%d but we only support protocol %d or lower", 180 data->protocol_version, LOGICALREP_PROTO_VERSION_NUM))); Although the if condition is not-equal, the error message says "we only support protocol %d or lower". Is this intentional? Or should this be fixed as below? 176 if (data->protocol_version > LOGICALREP_PROTO_VERSION_NUM) Attached is a simple patch in case of fixing. Regards, -- Yugo Nagata <nag...@sraoss.co.jp>
diff --git a/src/backend/replication/pgoutput/pgoutput.c b/src/backend/replication/pgoutput/pgoutput.c index 4a56288..370b74f 100644 --- a/src/backend/replication/pgoutput/pgoutput.c +++ b/src/backend/replication/pgoutput/pgoutput.c @@ -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",
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers