Re: vectorized CRC on ARM64
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: John Naylor <johncnaylorls@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-02T16:17:00Z
Lists: pgsql-hackers
On Thu, Apr 02, 2026 at 10:53:24AM -0500, Nathan Bossart wrote: > I think the new pg_comp_crc32_choose() is infinitely recursing on macOS > because USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK is not defined but > pg_crc32c_armv8_available() returns false. If I trace through that > function, I see that it's going straight to the > > #else > return false; > #endif > > at the end. And sure enough, both HAVE_ELF_AUX_INFO and HAVE_GETAUXVAL > aren't defined in pg_config.h. I think we might need to use sysctlbyname() > to determine PMULL support on macOS, but at this stage of the development > cycle, I would probably lean towards just compiling in the sb8 > implementation. Hm. On second thought, that probably regresses macOS builds because it was presumably using the armv8 path without runtime checks before... -- nathan
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Use C11 alignas instead of pg_attribute_aligned
- 182f6944d3d0 19 (unreleased) landed
- 8061bfd15abe master landed
-
Add missing guard for __builtin_constant_p
- 936d8974c3bc 18.4 landed
- 676626426285 19 (unreleased) landed
-
Exit early from pg_comp_crc32c_pmull for small inputs
- 948ef7cdc499 19 (unreleased) landed
-
Fix unused function warning on Arm platforms
- 2849fe4c9785 19 (unreleased) landed
-
Compute CRC32C on ARM using the Crypto Extension where available
- fbc57f2bc2ee 19 (unreleased) landed