Re: AIX support

Поиск
Список
Период
Сортировка
Искать
От
Heikki Linnakangas
Тема
Re: AIX support
Дата
Msg-id
af9f3d82-a1be-42cf-93b4-80e09664c3e5@iki.fi
Ответ на
RE: AIX support (Srirama Kucherlapati)
Список
Дерево обсуждения
AIX support Sriram RK <sriram.rk@outlook.com>
Re: AIX support Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: AIX support Tom Lane <tgl@sss.pgh.pa.us>
Re: AIX support Sriram RK <sriram.rk@outlook.com>
Re: AIX support Sriram RK <sriram.rk@outlook.com>
Re: AIX support Noah Misch <noah@leadboat.com>
Re: AIX support Tom Lane <tgl@sss.pgh.pa.us>
Re: AIX support Thomas Munro <thomas.munro@gmail.com>
Re: AIX support Thomas Munro <thomas.munro@gmail.com>
Re: AIX support Tom Lane <tgl@sss.pgh.pa.us>
Re: AIX support Sriram RK <sriram.rk@outlook.com>
Re: AIX support Noah Misch <noah@leadboat.com>
Re: AIX support Sriram RK <sriram.rk@outlook.com>
Re: AIX support Heikki Linnakangas <hlinnaka@iki.fi>
Re: AIX support Sriram RK <sriram.rk@outlook.com>
Re: AIX support Andres Freund <andres@anarazel.de>
Re: AIX support Thomas Munro <thomas.munro@gmail.com>
Re: AIX support Sriram RK <sriram.rk@outlook.com>
Re: AIX support Peter Eisentraut <peter@eisentraut.org>
Re: AIX support Tom Lane <tgl@sss.pgh.pa.us>
Re: AIX support Sriram RK <sriram.rk@outlook.com>
Re: AIX support Bruce Momjian <bruce@momjian.us>
Re: AIX support Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: AIX support Bruce Momjian <bruce@momjian.us>
Re: AIX support Michael Paquier <michael@paquier.xyz>
Re: AIX support Tom Lane <tgl@sss.pgh.pa.us>
Re: AIX support Andres Freund <andres@anarazel.de>
Re: AIX support Peter Eisentraut <peter@eisentraut.org>
Re: AIX support Tom Lane <tgl@sss.pgh.pa.us>
Re: AIX support Michael Paquier <michael@paquier.xyz>
Re: AIX support Sriram RK <sriram.rk@outlook.com>
Re: AIX support Sriram RK <sriram.rk@outlook.com>
Re: AIX support Sriram RK <sriram.rk@outlook.com>
Re: AIX support Sriram RK <sriram.rk@outlook.com>
Re: AIX support Peter Eisentraut <peter@eisentraut.org>
Re: AIX support Bruce Momjian <bruce@momjian.us>
Re: AIX support Sriram RK <sriram.rk@outlook.com>
Re: AIX support Noah Misch <noah@leadboat.com>
Re: AIX support Sriram RK <sriram.rk@outlook.com>
Re: AIX support Sriram RK <sriram.rk@outlook.com>
Re: AIX support Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: AIX support Sriram RK <sriram.rk@outlook.com>
Re: AIX support Peter Eisentraut <peter@eisentraut.org>
RE: AIX support Srirama Kucherlapati <sriram.rk@in.ibm.com>
Re: AIX support Heikki Linnakangas <hlinnaka@iki.fi>
Re: AIX support Bruce Momjian <bruce@momjian.us>
RE: AIX support Srirama Kucherlapati <sriram.rk@in.ibm.com>
Re: AIX support Laurenz Albe <laurenz.albe@cybertec.at>
RE: AIX support Srirama Kucherlapati <sriram.rk@in.ibm.com>
RE: AIX support Srirama Kucherlapati <sriram.rk@in.ibm.com>
Re: AIX support Heikki Linnakangas <hlinnaka@gmail.com>
RE: AIX support Srirama Kucherlapati <sriram.rk@in.ibm.com>
RE: AIX support Srirama Kucherlapati <sriram.rk@in.ibm.com>
RE: AIX support Srirama Kucherlapati <sriram.rk@in.ibm.com>
Re: AIX support Heikki Linnakangas <hlinnaka@iki.fi>
Re: AIX support Bruce Momjian <bruce@momjian.us>
Re: AIX support "Tristan Partin" <tristan@neon.tech>
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 ') > 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 ') > 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 

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



В списке pgsql-hackers по дате отправления
От: Melanie Plageman
Дата:
От: Jacob Champion
Дата:
FAQ