Re: pgsql: Add general purpose hasing functions to pgbench.

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers(at)lists(dot)postgresql(dot)org, Ildar Musin <i(dot)musin(at)postgrespro(dot)ru>
Subject: Re: pgsql: Add general purpose hasing functions to pgbench.
Date: 2018-03-22 16:31:31
Message-ID: alpine.DEB.2.20.1803221728100.22230@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers


> will fix,

A blind attempt, if it helps.

>> The 32-bit members of the buildfarm aren't very happy with this,
>> eg on dromedary:
>>
>> cache gcc -Wall -Wmissing-prototypes -Wpointer-arith
>> -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
>> -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -ansi -I. -I.
>> -I../../../src/interfaces/libpq -I../../../src/include
>> -DCOPY_PARSE_PLAN_TREES -DRAW_EXPRESSION_COVERAGE_TEST -c -o command.o
>> command.c
>> pgbench.c: In function 'getHashFnv1a':
>> pgbench.c:945: warning: integer constant is too large for 'long' type
>> pgbench.c:952: warning: integer constant is too large for 'long' type
>> pgbench.c: In function 'getHashMurmur2':
>> pgbench.c:967: warning: integer constant is too large for 'long' type
>> pgbench.c:970: warning: integer constant is too large for 'long' type
>> pgbench.c:972: warning: integer constant is too large for 'long' type
>> pgbench.c:975: warning: integer constant is too large for 'long' type
>> pgbench.c:978: warning: integer constant is too large for 'long' type
>>
>> Looks to me like the constants need to be written with INT64CONST().
>> Also, the fact that the added regression test is passing makes me
>> wonder whether it's actually exercising these functions meaningfully.

I think that there is at least some coverage
(https://coverage.postgresql.org/src/bin/pgbench/pgbench.c.gcov.html)
and the function results are also checked for some values in the perl
script output.

--
Fabien.

Attachment Content-Type Size
pgbench-hash-fix-1.patch text/plain 517 bytes

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Teodor Sigaev 2018-03-22 16:41:37 pgsql: UINT64CONST'fy long constants in pgbench
Previous Message Teodor Sigaev 2018-03-22 16:16:10 Re: pgsql: Add general purpose hasing functions to pgbench.