Re: A suspicious code in pgoutput_startup().

From: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: A suspicious code in pgoutput_startup().
Date: 2017-08-22 03:51:42
Message-ID: 20170822125142.d630dd72.nagata@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 15 Aug 2017 16:23:35 -0400
Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:

> On 7/27/17 20:52, Yugo Nagata wrote:
> > 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.
>
> Fixed, thanks.

Thanks, too!
>
> --
> Peter Eisentraut http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

--
Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2017-08-22 04:41:23 Re: Re: ICU collation variant keywords and pg_collation entries (Was: [BUGS] Crash report for some ICU-52 (debian8) COLLATE and work_mem values)
Previous Message Yugo Nagata 2017-08-22 03:51:25 Re: A little improvementof ApplyLauncherMain loop code