Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rA9bo-0053mH-07 for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Dec 2023 14:07:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rA9bm-00H3J1-LJ for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Dec 2023 14:07:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rA9bm-00H3It-Cg for pgsql-bugs@lists.postgresql.org; Mon, 04 Dec 2023 14:07:38 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rA9bf-008l4X-O5 for pgsql-bugs@lists.postgresql.org; Mon, 04 Dec 2023 14:07:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 3B4E7TwM750772; Mon, 4 Dec 2023 09:07:29 -0500 From: Tom Lane To: Daniel Gustafsson cc: king tomo , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18224: message bug in libpqwalreceiver.c. In-reply-to: References: <18224-59c34f71e2c6a5ed@postgresql.org> Comments: In-reply-to Daniel Gustafsson message dated "Mon, 04 Dec 2023 13:12:27 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <750770.1701698849.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 04 Dec 2023 09:07:29 -0500 Message-ID: <750771.1701698849@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Daniel Gustafsson writes: > I've changed > it to add a comment instead which explains why we check for < 3 and writ= e that > we expect 4 in the error message. It could be argued that we should say= that > we expect "3 or more" fields but given the age of the change we clearly = do > expect 4 at this point. I disagree with making this error message lie about what the test was. Clearly we need to s/3, 1/1, 3/ but I don't think the number should be different from what we actually allow. Having said that, maybe there's a case for requiring 4 columns now. I agree it's pretty unlikely that current releases would see a pre-9.4 server on the other end of the line. regards, tom lane