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

Поиск
Список
Период
Сортировка
От David Steele
Тема Re: pgsql: Avoid -Wconversion warnings when using checksum_impl.h
Дата
Msg-id e19fa62e-f140-306a-aa6b-fb55ccb3b9c1@pgmasters.net
обсуждение исходный текст
Ответ на Re: pgsql: Avoid -Wconversion warnings when using checksum_impl.h  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: pgsql: Avoid -Wconversion warnings when using checksum_impl.h  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-committers
On 3/5/20 7:48 PM, Michael Paquier wrote:
> On Thu, Mar 05, 2020 at 04:14:20PM -0800, Magnus Hagander wrote:
>> That's a pretty dangerous mistake, and moreso because we don't have a
>> test around it. We should really find a way to add such a test -- just
>> a hardcoded page calculation that should always return the same value
>> perhaps?
> 
> Yes..  Using pg_checksums --check on an upgraded instance which had
> checksums enabled would detect that immediately, but it could be
> possible also to have a SQL-callable function which takes in input a
> bytea and returns the checksum.  In order to make such tests reliable
> with any page size, we could pass down the page size to
> pg_checksum_page(), and then give the function's caller this
> possibility.  However I recall that we'd rather keep BLCKSZ hardcoded
> in checksum_impl.h on performance grounds.

Yeah, keeping BLKSZ a constant is pretty important for performance. 
That's one of the main reasons that we only support the default.

Regards,
-- 
-David
david@pgmasters.net



В списке pgsql-committers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pgsql: Avoid -Wconversion warnings when using checksum_impl.h
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pgsql: Avoid -Wconversion warnings when using checksum_impl.h