Re: pgsql: Avoid -Wconversion warnings when using checksum_impl.h

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: David Steele <david(at)pgmasters(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Avoid -Wconversion warnings when using checksum_impl.h
Date: 2020-03-06 00:39:59
Message-ID: 20200306003959.GV3195@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Greetings,

* Michael Paquier (michael(at)paquier(dot)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.
> >
> > 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 really
> > quickly. Normally we only pull in new code from PostgreSQL once a year.
> >
> > 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:
> >
> > https://github.com/pgbackrest/pgbackrest/blob/e55443c890181ea63a350275447885331c8254e4/test/src/module/postgres/interfaceTest.c#L182
>
> 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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2020-03-06 00:48:58 Re: pgsql: Avoid -Wconversion warnings when using checksum_impl.h
Previous Message Michael Paquier 2020-03-06 00:37:59 Re: pgsql: Avoid -Wconversion warnings when using checksum_impl.h