Re: pg_recvlogical broken in back branches - Mailing list pgsql-hackers

From Noah Misch
Subject Re: pg_recvlogical broken in back branches
Date
Msg-id 20180422215551.GB2676194@rfd.leadboat.com
Whole thread Raw
In response to Re: pg_recvlogical broken in back branches  (Michael Paquier <michael@paquier.xyz>)
Responses Re: pg_recvlogical broken in back branches  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Tue, Apr 17, 2018 at 03:38:13PM +0900, Michael Paquier wrote:
> On Tue, Apr 17, 2018 at 03:01:33AM -0300, Euler Taveira wrote:
> > A proposed fix is attached. It should be applied to 9.4, 9.5, 9.6, and
> > 10. (Although, client version 10 can connect to server version 10,
> > client version 10 can't connect to server version 9.6.)
> > 
> > Comments?
> 
> The exact same fix has already applied on all stable branches:
> - af5fbb1286 -> REL9_4_STABLE
> - 24ff0fe877 -> REL9_5_STABLE
> - 59743deca9 -> REL9_6_STABLE
> - e7d3a37d99 -> REL_10_STABLE
> - 8d2814f274 -> master

That change is testing the wrong variable.  I plan to repair it as attached.
I ran check-world with the following and found no similar defects:

--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -6106,4 +6106,5 @@ int
 PQserverVersion(const PGconn *conn)
 {
+    Assert(conn);
     if (!conn)
         return 0;

Attachment

pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: Toast issues with OldestXmin going backwards
Next
From: Michael Paquier
Date:
Subject: Re: pg_recvlogical broken in back branches