On Thu, Apr 08, 2021 at 11:36:48PM +1200, Thomas Munro wrote:
> Hi Julien, Bruce,
>
> A warning appears on 32 bit systems:
>
> In file included from pgstatfuncs.c:15:
> pgstatfuncs.c: In function 'pg_stat_get_activity':
> ../../../../src/include/postgres.h:593:29: warning: cast to pointer
> from integer of different size [-Wint-to-pointer-cast]
> 593 | #define DatumGetPointer(X) ((Pointer) (X))
> | ^
> ../../../../src/include/postgres.h:678:42: note: in expansion of macro
> 'DatumGetPointer'
> 678 | #define DatumGetUInt64(X) (* ((uint64 *) DatumGetPointer(X)))
> | ^~~~~~~~~~~~~~~
> pgstatfuncs.c:920:18: note: in expansion of macro 'DatumGetUInt64'
> 920 | values[29] = DatumGetUInt64(beentry->st_queryid);
> | ^~~~~~~~~~~~~~
Wow, that's really embarrassing :(
> Hmm, maybe this should be UInt64GetDatum()?
Yes definitely. I'm attaching the previous patch for force_parallel_mode to
not forget it + a new one for this issue.