public inbox for [email protected]
help / color / mirror / Atom feedFrom: Heikki Linnakangas <[email protected]>
To: Srirama Kucherlapati <[email protected]>
To: AIX PG user <[email protected]>
To: [email protected] <[email protected]>
To: Peter Eisentraut <[email protected]>
Subject: Re: AIX support
Date: Tue, 9 Dec 2025 23:00:28 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <SJ4PPFB817783263EA0FD91EBC346308C51DBA3A@SJ4PPFB81778326.namprd15.prod.outlook.com>
References: <CY5PR11MB63928CC05906F27FB10D74D0FD322@CY5PR11MB6392.namprd11.prod.outlook.com>
<[email protected]>
<176279401378.2081919.12877701948713975661.pgcf@coridan.postgresql.org>
<SJ4PPFB817783263EA0FD91EBC346308C51DBA3A@SJ4PPFB81778326.namprd15.prod.outlook.com>
On 09/12/2025 18:50, Srirama Kucherlapati wrote:
> @@ -1766,9 +1785,9 @@ endforeach
> # any types wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8
> # would be too much of a penalty for disk and memory space.
> alignof_double = cdata.get('ALIGNOF_DOUBLE')
> -if cc.alignment('int64_t', args: test_c_args, prefix: '#include <stdint.h>') > alignof_double
> - error('alignment of int64_t is greater than the alignment of double')
> -endif
> +#if cc.alignment('int64_t', args: test_c_args, prefix: '#include <stdint.h>') > alignof_double
> +# error('alignment of int64_t is greater than the alignment of double')
> +#endif
> cdata.set('MAXIMUM_ALIGNOF', alignof_double)
>
> cdata.set('SIZEOF_LONG', cc.sizeof('long', args: test_c_args))
This is unfinished.
> @@ -1820,7 +1839,7 @@ if cc.links('''
> if not meson.is_cross_build()
> r = cc.run('''
> /* This must match the corresponding code in c.h: */
> - #if defined(__GNUC__)
> + #if defined(__GNUC__) || defined(__IBMC__)
> #define pg_attribute_aligned(a) __attribute__((aligned(a)))
> #elif defined(_MSC_VER)
> #define pg_attribute_aligned(a) __declspec(align(a))
There's a comment right there that it must match the corresponding code
in c.h, but you didn't modify c.h.
> + # Native memset() is faster, tested on:
> + memset_loop_limit = 0
Incomplete sentence: tested on what?
We talked about this before. I'm reluctant to have a special case for
AIX, because I suspect this has little to do with the operating system,
and more with the compiler and the CPU architecture. I could be wrong;
maybe the libc memset() implementation on AIX is superior to that on
linux, for example. I'd love to see thorough performance testing of
MemSetAligned() vs memset() on common combinations of CPUs and libc
implementations. Ideally, we can just replace MemSetAligned() with
memset() everywhere.
If you do such testing, please start a separate thread for that. On this
thread, it will get lost with all the AIX-specific stuff.
> +/* This change is required for the meson changes as the autoconf is not run and
> + * to resolve the conflicts in picking the float.h details by default from the
> + * postgres defined datatypes.
> + */
> +#ifdef _AIX
> +#ifndef PGDLLIMPORT
> +#define PGDLLIMPORT
> +#endif /* PGDLLIMPORT */
> +typedef float float4;
> +typedef double float8;
I don't understand these typedefs. What is the conflict the comment
talks about?
> +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
> +#define pg_noreturn _Noreturn
> +#elif defined(__GNUC__)
> +#define pg_noreturn __attribute__((noreturn))
> +#else
> +#define pg_noreturn
> +#endif
Isn't this just duplicating the snippet in c.h?
> +#include <stdbool.h>
This is in c.h too.
> src/include/storage/s_lock.h
> [ switches to __sync_lock_release(lock) on all powerpc systems ]
We talked about this before.
> @@ -18,7 +18,8 @@ GetOptions(
>
> if (not( $format eq 'darwin'
> or $format eq 'gnu'
> - or $format eq 'win'))
> + or $format eq 'win'
> + or $format eq 'aix'))
> {
> die "$0: $format is not yet handled (only darwin, gnu, win are)\n";
> }
Forgot to update the error message.
I didn't review the autoconf / Makefile changes.
> Apologies for the delayed response; I was occupied with other tasks.
Oh no worries, I'm not in any hurry with this. On the contrary to be honest.
- Heikki
view thread (73+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: AIX support
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox