Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jA122-0006pm-4p for pgsql-committers@arkaria.postgresql.org; Fri, 06 Mar 2020 00:40:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jA120-0002dS-U3 for pgsql-committers@arkaria.postgresql.org; Fri, 06 Mar 2020 00:40:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jA120-0002dL-EV for pgsql-committers@lists.postgresql.org; Fri, 06 Mar 2020 00:40:00 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jA11x-0004RC-6H for pgsql-committers@lists.postgresql.org; Fri, 06 Mar 2020 00:39:58 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id BB5E15F799; Thu, 5 Mar 2020 19:39:59 -0500 (EST) Date: Thu, 5 Mar 2020 19:39:59 -0500 From: Stephen Frost To: Michael Paquier Cc: David Steele , Magnus Hagander , pgsql-committers Subject: Re: pgsql: Avoid -Wconversion warnings when using checksum_impl.h Message-ID: <20200306003959.GV3195@tamriel.snowman.net> References: <1cf30561-7dad-dc6e-9fc3-5c456948cfeb@pgmasters.net> <20200305233014.GA2501@paquier.xyz> <7916219a-96c6-4298-cb36-c97c6bd3930c@pgmasters.net> <20200306003759.GA52814@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5lmt5ZuWJeWMWtKW" Content-Disposition: inline In-Reply-To: <20200306003759.GA52814@paquier.xyz> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --5lmt5ZuWJeWMWtKW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Michael Paquier (michael@paquier.xyz) wrote: > On Thu, Mar 05, 2020 at 07:32:59PM -0500, David Steele wrote: > > FWIW, we use static values in our unit tests (which are written in C), = then > > test against packaged versions of Postgres for integration tests. > >=20 > > When I saw the commit I pulled it in so I could remove instructions for= the > > manual step to add the cast. So in this case the issue was apparent re= ally > > quickly. Normally we only pull in new code from PostgreSQL once a year. > >=20 > > We think our unit tests against static values may have endianess issues= but > > we have not verified that one way or the other. Here's what they look = like: > >=20 > > https://github.com/pgbackrest/pgbackrest/blob/e55443c890181ea63a3502754= 47885331c8254e4/test/src/module/postgres/interfaceTest.c#L182 >=20 > By doing so, the tests still fail if the page size is something else > than 8k, no? Of course, but we check that from pg_controldata before we actually start doing anything with the cluster. Even a test which at least validated that the checksum code was returning the right value when page size is the (rather common...) 8K would be better than a change like this not breaking any tests.. Thanks, Stephen --5lmt5ZuWJeWMWtKW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJeYZvfAAoJEO1sijiDR2RVOhwQAIU5YIxseurPAM+sc+D5pIFB XX8d1UYqz+TV6cBn+iPygE5WpI2fY/vj4dg5mAsab8h3raZOIQbOl5KV0uS5Wdw5 h70R1IqchFy7uApl4oU/Xf2Vpo2rfWEQZefXvl268McxnKwb38vFXMV469Vzkm34 CyHmqAAQlJCL3atxjo0oPv9kEFhg8DUH/iui/fih5eLWQlqzoSlcFi5mYOyJzCsj 4gHu4AsfCwPoXQmi24bBnCPM6m6eqPnq9dRodWrCT67mGWOqC6aBxpfMBWuhVkbK 6/g/A49NPNP+98pNSPo9HkPH0VOe6+4Lf814OVUnaQSnZ2GyVvfqvldBA5MnsGuO ib9JV1OkcG6ltp/fuOHt2UxN9TC2NSgNNuFZneigOhRV1BWK4sdZ2ltlxcy0ccJu sWVANifFanEV7Y9vvz+X/rPPWOXwdSjaJ+YSIzhGsFcJ/PL3cYFX7aNOSndJ1N+x bsR4ll9oeiCoVwp8aIQuRB9cBHkZ7HxCp29rLN5QW4HHxD8nz9FCtJvNUZHC5IKc P2jbV1EvcZLm2tSpW0sHmt8alTFemle0txUGJ4fzznl/uF5wSqkiFk6MCEAK6c0X s/LeIoKF/s+ngVqKuUlOK0I0FwWqeeG8TnNM1W37M1nIpPYs394bAQNXrQVM2Ckf 0YO2dz8KVLvB1ck2AtA7 =8c4l -----END PGP SIGNATURE----- --5lmt5ZuWJeWMWtKW--