Re: pgsql: Inline CRC computation for small fixed-length input on x86

2025-03-31 Thread John Naylor
On Tue, Apr 1, 2025 at 1:58 AM Todd Cook wrote: > > On 3/31/25, 7:17 AM, "John Naylor" > wrote: > > A possible workaround would be add a normally-superfluous > > "pg_attribute_target("sse4.2")" to the inlined function, as in the > > attached. > > The build succeeds

pgsql: Use function attributes for SSE 4.2 even when targeting that ext

2025-03-31 Thread John Naylor
Use function attributes for SSE 4.2 even when targeting that extension On Red Hat 9 systems (or similar), the packaged gcc targets x86-64-v2, but clang does not. This has caused build failures in the wake of commit e2809e3a1 when building --with-llvm. The most expedient fix is to use the same fun

Re: pgsql: Inline CRC computation for small fixed-length input on x86

2025-03-31 Thread John Naylor
On Mon, Mar 31, 2025 at 8:09 PM Tom Lane wrote: > > I wrote: > > What I conclude is that Red Hat hot-wired gcc to assume -msse4.2, > > but they didn't hot-wire clang the same way. > > In confirmation of that: everything goes through fine if I manually > add -msse4.2 to configure's choice of BITCOD

pgsql: Fix failing regression test on x86-32 machines

2025-03-31 Thread David Rowley
Fix failing regression test on x86-32 machines 95d6e9af0 added code to display the tuplestore storage type for WindowAgg nodes and added a test to ensure the "Disk" storage method was working correctly by setting work_mem to 64 and running a test which caused the WindowAgg to go to disk. Seemingl

Re: pgsql: Inline CRC computation for small fixed-length input on x86

2025-03-31 Thread Todd Cook
On 3/31/25, 7:17 AM, "John Naylor" mailto:johncnaylo...@gmail.com>> wrote: > A possible workaround would be add a normally-superfluous > "pg_attribute_target("sse4.2")" to the inlined function, as in the > attached. The build succeeds on skimmer with this patch and using the configure command fro

Re: pgsql: Inline CRC computation for small fixed-length input on x86

2025-03-31 Thread John Naylor
On Mon, Mar 31, 2025 at 3:07 PM John Naylor wrote: > > On Mon, Mar 31, 2025 at 2:18 PM John Naylor wrote: > > > Hmm, skimmer doesn't like this, and it's one of the animals that > > builds with -msse4.2: > > > > https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=skimmer&dt=2025-03-31%20

Re: pgsql: Inline CRC computation for small fixed-length input on x86

2025-03-31 Thread Tom Lane
I wrote: >> What I conclude is that Red Hat hot-wired gcc to assume -msse4.2, >> but they didn't hot-wire clang the same way. > In confirmation of that: everything goes through fine if I manually > add -msse4.2 to configure's choice of BITCODE_CFLAGS. Also, possibly useful for testing purposes: I

Re: pgsql: aio: Add core asynchronous I/O infrastructure

2025-03-31 Thread Andres Freund
Hi, On 2025-03-31 19:23:57 +0300, Aleksander Alekseev wrote: > Hi Andres, > > > aio: Add core asynchronous I/O infrastructure > > > > [...] > > I noticed that aio.c references README.md: > > ``` > * aio.c > *AIO - Core Logic > * > * For documentation about how AIO works on a higher leve

pgsql: Fix accidentally-harmless thinko in psqlscan_test_variable().

2025-03-31 Thread Tom Lane
Fix accidentally-harmless thinko in psqlscan_test_variable(). This code was passing literal strings to psqlscan_emit, which is quite contrary to that function's specification: "If you pass it something that is not part of the yytext string, you are making a mistake". It accidentally worked anyway

Re: pgsql: Inline CRC computation for small fixed-length input on x86

2025-03-31 Thread Tom Lane
I wrote: > What I conclude is that Red Hat hot-wired gcc to assume -msse4.2, > but they didn't hot-wire clang the same way. In confirmation of that: everything goes through fine if I manually add -msse4.2 to configure's choice of BITCODE_CFLAGS. Not sure if that line of thought can lead to a usab

Re: pgsql: Inline CRC computation for small fixed-length input on x86

2025-03-31 Thread Tom Lane
I wrote: > I have reproduced it on a genuine-Red-Hat RHEL 9 x86_64 machine, > but only when compiling with --with-llvm, and the error goes away > if I select CC=clang. Also, a build with meson doesn't fall into the same trap. I'm not sure why, because I can't find where in the build.ninja file it

Re: pgsql: Inline CRC computation for small fixed-length input on x86

2025-03-31 Thread Tom Lane
John Naylor writes: > The two problem systems are CentOS stream 9 (apparently using LTO), > and Rocky Linux 9 (still awaiting details). Both of these are supposed > to be like RHEL 9. I have reproduced it on a genuine-Red-Hat RHEL 9 x86_64 machine, but only when compiling with --with-llvm, and th

Re: pgsql: Inline CRC computation for small fixed-length input on x86

2025-03-31 Thread John Naylor
On Mon, Mar 31, 2025 at 3:34 PM Kyotaro Horiguchi wrote: > I'm not sure if it's related to this, but I got the following build error. > 3 errors generated. > > > Rocky Linux release 9.5 (Blue Onyx) > > gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5) > > clang version 18.1.8 (RESF 18.1.8-3.el9) Must

Re: pgsql: Inline CRC computation for small fixed-length input on x86

2025-03-31 Thread Kyotaro Horiguchi
At Mon, 31 Mar 2025 15:07:36 +0700, John Naylor wrote in > Looking at the configure output, I don't see -msee4.2 (or equivalent), > so it shouldn't be reporting that it's targeting SSE 4.2. Maybe it's > using a cached value, and deleting the configure cache would clear > this up? (CC'-d owner)

Re: pgsql: Inline CRC computation for small fixed-length input on x86

2025-03-31 Thread John Naylor
On Mon, Mar 31, 2025 at 2:18 PM John Naylor wrote: > Hmm, skimmer doesn't like this, and it's one of the animals that > builds with -msse4.2: > > https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=skimmer&dt=2025-03-31%2007%3A00%3A27&stg=configure > > "checking which CRC-32C implementa

Re: pgsql: Inline CRC computation for small fixed-length input on x86

2025-03-31 Thread John Naylor
On Mon, Mar 31, 2025 at 1:28 PM John Naylor wrote: > > Inline CRC computation for small fixed-length input on x86 Hmm, skimmer doesn't like this, and it's one of the animals that builds with -msse4.2: https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=skimmer&dt=2025-03-31%2007%3A00%3