public inbox for [email protected]
help / color / mirror / Atom feedRE: AIX support
29+ messages / 11 participants
[nested] [flat]
* RE: AIX support
@ 2025-02-07 16:50 Srirama Kucherlapati <[email protected]>
0 siblings, 1 reply; 29+ messages in thread
From: Srirama Kucherlapati @ 2025-02-07 16:50 UTC (permalink / raw)
To: Heikki Linnakangas <[email protected]>; pgsql-hackers; [email protected] <[email protected]>; +Cc: Bruce Momjian <[email protected]>; Robert Haas <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>
Hi Team,
A few updates regarding the meson build.
We have successfully resolved issues with the meson build on AIX, allowing the meson configure and build to succeed.
A problem was addressed in the meson script wrt AIX (to build a nested shared libraries), specifically in the symbolextractor.py file. The fix has been implemented and will be submitted to the meson community.
https://github.com/mesonbuild/meson/blob/07f595fa98087352940121c87ba9aca0ebc95996/mesonbuild/scripts...
Currently, we are verifying the test results.
Warm regards,
Sriram.
^ permalink raw reply [nested|flat] 29+ messages in thread
* RE: AIX support
@ 2025-03-07 14:11 Srirama Kucherlapati <[email protected]>
parent: Srirama Kucherlapati <[email protected]>
0 siblings, 1 reply; 29+ messages in thread
From: Srirama Kucherlapati @ 2025-03-07 14:11 UTC (permalink / raw)
To: Heikki Linnakangas <[email protected]>; pgsql-hackers; [email protected] <[email protected]>; +Cc: Bruce Momjian <[email protected]>; Robert Haas <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>
Hi Team,
Our team has identified couple of issues with the meson build on AIX, primarily focusing on the following areas:
1. Symbol extraction and resolution in object files during binary creation.
2. Dynamic runtime library path resolution in shared libraries.
We have resolved them and we plan to submit these fixes to the meson community shortly.
In addition, we are actively working on resolving other test issues. I will provide you with updates once these problems have been resolved.
92/301 postgresql:regress / regress/regress
# 4 of 223 tests failed.
Warm regards,
Sriram.
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-03-07 16:20 Robert Haas <[email protected]>
parent: Srirama Kucherlapati <[email protected]>
0 siblings, 1 reply; 29+ messages in thread
From: Robert Haas @ 2025-03-07 16:20 UTC (permalink / raw)
To: Srirama Kucherlapati <[email protected]>; +Cc: Heikki Linnakangas <[email protected]>; pgsql-hackers; [email protected] <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>
On Fri, Mar 7, 2025 at 9:11 AM Srirama Kucherlapati
<[email protected]> wrote:
> Our team has identified couple of issues with the meson build on AIX, primarily focusing on the following areas:
>
> Symbol extraction and resolution in object files during binary creation.
> Dynamic runtime library path resolution in shared libraries.
>
> We have resolved them and we plan to submit these fixes to the meson community shortly.
Nice!
--
Robert Haas
EDB: http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 29+ messages in thread
* RE: AIX support
@ 2025-03-17 16:58 Srirama Kucherlapati <[email protected]>
parent: Robert Haas <[email protected]>
0 siblings, 1 reply; 29+ messages in thread
From: Srirama Kucherlapati @ 2025-03-17 16:58 UTC (permalink / raw)
To: Robert Haas <[email protected]>; pgsql-hackers; Heikki Linnakangas <[email protected]>; [email protected] <[email protected]>; +Cc: Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>
Hi Team,
Here are the updates on the meson on AIX. Our team had pushed the fixes meson github here …
https://github.com/mesonbuild/meson/pull/14335
#14335 Enhance AIX shared library build to use an export List.<https://github.com/mesonbuild/meson/pull/14335;
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-04-03 08:25 wenhui qiu <[email protected]>
parent: Srirama Kucherlapati <[email protected]>
0 siblings, 1 reply; 29+ messages in thread
From: wenhui qiu @ 2025-04-03 08:25 UTC (permalink / raw)
To: Srirama Kucherlapati <[email protected]>; +Cc: Robert Haas <[email protected]>; pgsql-hackers; Heikki Linnakangas <[email protected]>; [email protected] <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>
HI Srirama
It's getting close to code freeze. Any updates from your end?
Thanks
On Tue, Mar 18, 2025 at 12:58 AM Srirama Kucherlapati <[email protected]>
wrote:
> Hi Team,
>
> Here are the updates on the meson on AIX. Our team had pushed the fixes
> meson github here …
>
>
>
> https://github.com/mesonbuild/meson/pull/14335
>
>
>
> #14335 Enhance AIX shared library build to use an export List.
> <https://github.com/mesonbuild/meson/pull/14335;
>
>
>
>
>
>
>
>
^ permalink raw reply [nested|flat] 29+ messages in thread
* RE: AIX support
@ 2025-04-03 13:45 Srirama Kucherlapati <[email protected]>
parent: wenhui qiu <[email protected]>
0 siblings, 2 replies; 29+ messages in thread
From: Srirama Kucherlapati @ 2025-04-03 13:45 UTC (permalink / raw)
To: wenhui qiu <[email protected]>; Heikki Linnakangas <[email protected]>; [email protected] <[email protected]>; pgsql-hackers; +Cc: Robert Haas <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>
Hi Wenhui Qiu,
May I know the freeze dates.
We are nearly ready to deliver the patch. Currently, we have compiled the
source using Meson and are investigating one test case issue. Once we pinpoint
the cause, we will send you the patch. Notably, this test case behaves
differently on AIX, opting for a Bitmap Index Scan instead of an Index Scan.
Not sure if this is really specific to AIX?
>> meson test
396 Ok: 81
397 Expected Fail: 0
398 Fail: 1 (regex)
399 Unexpected Pass: 0
400 Skipped: 219
401 Timeout: 0
>>
7 explain (costs off) select * from pg_proc where proname ~ '^abc';
8 - QUERY PLAN
9 -----------------------------------------------------------------------
10 - Index Scan using pg_proc_proname_args_nsp_index on pg_proc
11 - Index Cond: ((proname >= 'abc'::text) AND (proname < 'abd'::text))
12 + QUERY PLAN
13 +----------------------------------------------------------------------------
14 + Bitmap Heap Scan on pg_proc
15 Filter: (proname ~ '^abc'::text)
16 -(3 rows)
17 + -> Bitmap Index Scan on pg_proc_proname_args_nsp_index
18 + Index Cond: ((proname >= 'abc'::text) AND (proname < 'abd'::text))
19 +(4 rows)
As of now below are the changes wrt to meson.
modified: meson.build
modified: src/backend/meson.build
modified: src/bin/initdb/initdb.c
modified: src/include/c.h
modified: src/include/port/aix.h
modified: src/include/utils/float.h
modified: src/interfaces/ecpg/compatlib/meson.build
modified: src/interfaces/ecpg/ecpglib/meson.build
modified: src/interfaces/ecpg/pgtypeslib/meson.build
modified: src/interfaces/libpq/meson.build
modified: src/test/regress/expected/txid.out
modified: src/test/regress/expected/xid.out
modified: src/test/regress/sql/sanity_check.sql
Warm regards,
Sriram.
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-04-03 13:49 Heikki Linnakangas <[email protected]>
parent: Srirama Kucherlapati <[email protected]>
1 sibling, 1 reply; 29+ messages in thread
From: Heikki Linnakangas @ 2025-04-03 13:49 UTC (permalink / raw)
To: Srirama Kucherlapati <[email protected]>; wenhui qiu <[email protected]>; [email protected] <[email protected]>; pgsql-hackers; +Cc: Robert Haas <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>
On 03/04/2025 16:45, Srirama Kucherlapati wrote:
> Hi Wenhui Qiu,
>
> May I know the freeze dates.
April 8th is the feature freeze. Any new features must be *committed* by
then. We are already very close to that, and given that there's no
concrete patch for committer to review yet, I think it's safe to say
that you missed it already.
--
Heikki Linnakangas
Neon (https://neon.tech)
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-04-03 13:54 Andres Freund <[email protected]>
parent: Srirama Kucherlapati <[email protected]>
1 sibling, 0 replies; 29+ messages in thread
From: Andres Freund @ 2025-04-03 13:54 UTC (permalink / raw)
To: Srirama Kucherlapati <[email protected]>; +Cc: wenhui qiu <[email protected]>; Heikki Linnakangas <[email protected]>; [email protected] <[email protected]>; pgsql-hackers; Robert Haas <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>
Hi,
On 2025-04-03 13:45:01 +0000, Srirama Kucherlapati wrote:
> We are nearly ready to deliver the patch. Currently, we have compiled the
> source using Meson and are investigating one test case issue. Once we pinpoint
> the cause, we will send you the patch. Notably, this test case behaves
> differently on AIX, opting for a Bitmap Index Scan instead of an Index Scan.
> Not sure if this is really specific to AIX?
>
> >> meson test
>
> 396 Ok: 81
> 397 Expected Fail: 0
> 398 Fail: 1 (regex)
> 399 Unexpected Pass: 0
> 400 Skipped: 219
FWIW, the skipped tests indicate that you are building without tap tests or
such - that means most of the testsuite is not run. That certainly is not good
enough.
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 29+ messages in thread
* RE: AIX support
@ 2025-04-04 19:31 Srirama Kucherlapati <[email protected]>
parent: Heikki Linnakangas <[email protected]>
0 siblings, 1 reply; 29+ messages in thread
From: Srirama Kucherlapati @ 2025-04-04 19:31 UTC (permalink / raw)
To: Heikki Linnakangas <[email protected]>; wenhui qiu <[email protected]>; [email protected] <[email protected]>; pgsql-hackers; +Cc: Robert Haas <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>
Hi Heikki and team,
Thank you for considering our request. As discussed, we have revised the patch
to incorporate all the review comments provided.
Please find the attached patch, which focuses solely on the gmake changes.
As discussed the meson specific changes would be provided as different patch.
We have taken into account and resolved the earlier comments within this patch.
https://www.postgresql.org/message-id/e0dc2bff-300b-4edd-912b-b6c52274bdc5%40iki.fi
- Build using latest master. (used commit 898c131b58a0b)
- We have merged our changes to this latest level.
- configure.ac
- Updated the changes aligning to configure file.
- configure
- Updated the comments wrt to the alignment details. Updated with
the gcc specific fix which talks about the alignment.
- updated the int64_t specific changes.
- doc/src/sgml/dfunc.sgml
- This is removed as it is not relevant.
- src/backend/port/aix/mkldexport.sh
- When building shared libraries from various archives on AIX, we encounter a
situation where symbols are not exported. To resolve this, we require an export
file. For instance, the command is used to export symbols.
gcc -shared libtest.so libtest.a -Wl,-bE:test.exp
However, if we directly provide object files in the command line instead of an
archive, the symbols will be exported automatically, as demonstrated by the command
gcc -shared libtest.so test1.o test2.o test3.o.
- We will update the description with additional details in the later point of time. (Considering the time lines)
- src/makefiles/Makefile.aix
- The changes in this file are required
- This change is not required “+LDFLAGS_SL += -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE”
- src/template/aix
- WRT to the MEMSET_LOOP_LIMIT flag, this is set to “0”, which would internally use
The system call memset() as mentioned in the below link as well
https://www.postgresql.org/message-id/20060203135315.E08B09DC816%40postgresql.org
I Kindly request you to review the changes and provide your feedback.
With all the above changes we have built and ran the tests. As of now we see
there is only one test case that is failing, which seems to have been
introduced recently. And this might not be related to the above changes as
earlier there were no test cases failing.
64 not ok 12 + float8 235 ms
297 # 1 of 226 tests failed.
20 +ERROR: value out of range: overflow
21 -- test overflow/underflow handling
22 SELECT gamma(float8 '-infinity');
23 ERROR: value out of range: overflow
Warm regards,
Sriram.
Attachments:
[application/octet-stream] 0001-AIX-support.v7.patch (14.4K, 3-0001-AIX-support.v7.patch)
download | inline diff:
From 614cd077da0de9ca92c4e4fb300c39f73ab5ad10 Mon Sep 17 00:00:00 2001
From: Sriram RK <[email protected]>
Date: Fri, 4 Apr 2025 13:16:21 -0500
Subject: [PATCH] AIX support.
---
Makefile | 2 -
configure | 34 ++++++++++++++---
configure.ac | 34 ++++++++++++++---
src/Makefile.shlib | 29 ++++++++++++++
src/backend/Makefile | 20 ++++++++++
src/backend/port/aix/mkldexport.sh | 61 ++++++++++++++++++++++++++++++
src/backend/utils/error/elog.c | 2 +
src/include/port/aix.h | 4 ++
src/include/storage/s_lock.h | 10 ++---
src/makefiles/Makefile.aix | 39 +++++++++++++++++++
src/port/strerror.c | 2 +
src/template/aix | 7 ++++
12 files changed, 224 insertions(+), 20 deletions(-)
create mode 100755 src/backend/port/aix/mkldexport.sh
create mode 100644 src/include/port/aix.h
create mode 100644 src/makefiles/Makefile.aix
create mode 100644 src/template/aix
diff --git a/Makefile b/Makefile
index 8a2ec9396b6..9bc1a4ec17b 100644
--- a/Makefile
+++ b/Makefile
@@ -13,8 +13,6 @@
# AIX make defaults to building *every* target of the first rule. Start with
# a single-target, empty rule to make the other targets non-default.
-# (We don't support AIX anymore, but if someone tries to build on AIX anyway,
-# at least they'll get the instructions to run 'configure' first.)
all:
all check install installdirs installcheck installcheck-parallel uninstall clean distclean maintainer-clean dist distcheck world check-world install-world installcheck-world:
diff --git a/configure b/configure
index 11615d1122d..6088fa26679 100755
--- a/configure
+++ b/configure
@@ -3008,6 +3008,7 @@ else
# --with-template not given
case $host_os in
+ aix*) template=aix ;;
cygwin*|msys*) template=cygwin ;;
darwin*) template=darwin ;;
dragonfly*) template=netbsd ;;
@@ -16953,13 +16954,34 @@ _ACEOF
# wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too
# much of a penalty for disk and memory space.
-MAX_ALIGNOF=$ac_cv_alignof_double
+if test "$PORTNAME" != "aix"; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
+
+ if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
+ as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
+ fi
+ if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF ; then
+ as_fn_error $? "alignment of 'long long int' is greater than the alignment of 'double'" "$LINENO" 5
+ fi
+else
+# The AIX 'power' alignment rules apply the natural alignment of the "first
+# member" if it is of a floating-point data type (or is an aggregate whose
+# recursively "first" member or element is such a type). The alignment
+# associated with these types for subsequent members use an alignment value
+# where the floating-point data type is considered to have 4-byte alignment.
+# More info
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99557
+#
+# The double is aligned to 4-bytes on AIX in aggregates. But to maintain
+# alignement across platforms the max alignment of long should be considered.
+ MAX_ALIGNOF=$ac_cv_alignof_long
+ if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
+ fi
+ if test $MAX_ALIGNOF -lt $ac_cv_alignof_int64_t; then
+ MAX_ALIGNOF="$ac_cv_alignof_int64_t"
+ fi
-if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
- as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
-fi
-if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF ; then
- as_fn_error $? "alignment of 'int64_t' is greater than the alignment of 'double'" "$LINENO" 5
fi
cat >>confdefs.h <<_ACEOF
diff --git a/configure.ac b/configure.ac
index debdf165044..c21aaa52064 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,6 +62,7 @@ PGAC_ARG_REQ(with, template, [NAME], [override operating system template],
# --with-template not given
case $host_os in
+ aix*) template=aix ;;
cygwin*|msys*) template=cygwin ;;
darwin*) template=darwin ;;
dragonfly*) template=netbsd ;;
@@ -1987,13 +1988,34 @@ AC_CHECK_ALIGNOF(double)
# wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too
# much of a penalty for disk and memory space.
-MAX_ALIGNOF=$ac_cv_alignof_double
+if test "$PORTNAME" != "aix"; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
+
+ if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
+ as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
+ fi
+ if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF; then
+ as_fn_error $? "alignment of 'long long int' is greater than the alignment of 'double'" "$LINENO" 5
+ fi
+else
+# The AIX 'power' alignment rules apply the natural alignment of the "first
+# member" if it is of a floating-point data type (or is an aggregate whose
+# recursively "first" member or element is such a type). The alignment
+# associated with these types for subsequent members use an alignment value
+# where the floating-point data type is considered to have 4-byte alignment.
+# More info
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99557
+#
+# The double is aligned to 4-bytes on AIX in aggregates. But to maintain
+# alignement across platforms the max alignment of long should be considered.
+ MAX_ALIGNOF=$ac_cv_alignof_long
+ if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
+ fi
+ if test $MAX_ALIGNOF -lt $ac_cv_alignof_int64_t ; then
+ MAX_ALIGNOF="$ac_cv_alignof_int64_t"
+ fi
-if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
- AC_MSG_ERROR([alignment of 'long' is greater than the alignment of 'double'])
-fi
-if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF ; then
- AC_MSG_ERROR([alignment of 'int64_t' is greater than the alignment of 'double'])
fi
AC_DEFINE_UNQUOTED(MAXIMUM_ALIGNOF, $MAX_ALIGNOF, [Define as the maximum alignment requirement of any C data type.])
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index fa81f6ffdd6..13ea84ac185 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -106,6 +106,20 @@ ifdef SO_MAJOR_VERSION
override CPPFLAGS += -DSO_MAJOR_VERSION=$(SO_MAJOR_VERSION)
endif
+ifeq ($(PORTNAME), aix)
+ LINK.shared = $(COMPILER)
+ ifdef SO_MAJOR_VERSION
+ shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
+ endif
+ haslibarule = yes
+ # $(exports_file) is also usable as an import file
+ exports_file = lib$(NAME).exp
+ BUILD.exports = ( echo '\#! $(shlib)'; $(AWK) '/^[^\#]/ {printf "%s\n",$$1}' $< ) > $@
+ ifneq (,$(SHLIB_EXPORTS))
+ LINK.shared += -Wl,-bE:$(exports_file)
+ endif
+endif
+
ifeq ($(PORTNAME), darwin)
ifdef soname
# linkable library
@@ -254,6 +268,14 @@ $(stlib): $(OBJS) | $(SHLIB_PREREQS)
touch $@
endif #haslibarule
+# AIX wraps both shared libraries and static library, which can be used both
+# for static and shared linking
+ifeq ($(PORTNAME), aix)
+$(stlib): $(shlib)
+ rm -f $(stlib)
+ $(AR) $(AROPT) $(stlib) $(shlib)
+endif # aix
+
ifeq (,$(filter cygwin win32,$(PORTNAME)))
# Normal case
@@ -267,8 +289,11 @@ ifneq ($(shlib), $(shlib_major))
endif
# Make sure we have a link to a name without any version numbers
ifneq ($(shlib), $(shlib_bare))
+# except on AIX, where that's not a thing
+ifneq ($(PORTNAME), aix)
rm -f $(shlib_bare)
$(LN_S) $(shlib) $(shlib_bare)
+endif # aix
endif # shlib_bare
endif # shlib_major
@@ -376,6 +401,9 @@ install-lib-static: $(stlib) installdirs-lib
install-lib-shared: $(shlib) installdirs-lib
ifdef soname
+# we don't install $(shlib) on AIX
+# (see http://archives.postgresql.org/message-id/52EF20B2E3209443BC37736D00C3C1380A6E79FE@EXADV1.host.magwien.gv.at)
+ifneq ($(PORTNAME), aix)
$(INSTALL_SHLIB) $< '$(DESTDIR)$(libdir)/$(shlib)'
ifneq ($(PORTNAME), cygwin)
ifneq ($(PORTNAME), win32)
@@ -391,6 +419,7 @@ ifneq ($(shlib), $(shlib_bare))
endif
endif # not win32
endif # not cygwin
+endif # not aix
ifneq (,$(findstring $(PORTNAME),win32 cygwin))
$(INSTALL_SHLIB) $< '$(DESTDIR)$(bindir)/$(shlib)'
endif
diff --git a/src/backend/Makefile b/src/backend/Makefile
index 7344c8c7f5c..572f5430a60 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -63,12 +63,14 @@ all: submake-libpgport submake-catalog-headers submake-utils-headers postgres $(
ifneq ($(PORTNAME), cygwin)
ifneq ($(PORTNAME), win32)
+ifneq ($(PORTNAME), aix)
postgres: $(OBJS)
$(CC) $(CFLAGS) $(call expand_subsys,$^) $(LDFLAGS) $(LIBS) -o $@
endif
endif
+endif
ifeq ($(PORTNAME), cygwin)
@@ -95,6 +97,24 @@ libpostgres.a: postgres
endif # win32
+ifeq ($(PORTNAME), aix)
+
+postgres: $(POSTGRES_IMP)
+ $(CC) $(CFLAGS) $(call expand_subsys,$(OBJS)) $(LDFLAGS) -Wl,-bE:$(top_builddir)/src/backend/$(POSTGRES_IMP) $(LIBS) -Wl,-brtllib -o $@
+
+# Linking to a single .o with -r is a lot faster than building a .a or passing
+# all objects to MKLDEXPORT.
+#
+# It looks alluring to use $(CC) -r instead of ld -r, but that doesn't
+# trivially work with gcc, due to gcc specific static libraries linked in with
+# -r.
+$(POSTGRES_IMP): $(OBJS)
+ ld -r -o SUBSYS.o $(call expand_subsys,$^)
+ $(MKLDEXPORT) SUBSYS.o . > $@
+ @rm -f SUBSYS.o
+
+endif # aix
+
$(top_builddir)/src/port/libpgport_srv.a: | submake-libpgport
diff --git a/src/backend/port/aix/mkldexport.sh b/src/backend/port/aix/mkldexport.sh
new file mode 100755
index 00000000000..adf3793e868
--- /dev/null
+++ b/src/backend/port/aix/mkldexport.sh
@@ -0,0 +1,61 @@
+#!/bin/sh
+#
+# mkldexport
+# create an AIX exports file from an object file
+#
+# src/backend/port/aix/mkldexport.sh
+#
+# Usage:
+# mkldexport objectfile [location]
+# where
+# objectfile is the current location of the object file.
+# location is the eventual (installed) location of the
+# object file (if different from the current
+# working directory).
+#
+# [This file comes from the Postgres 4.2 distribution. - ay 7/95]
+#
+# Header: /usr/local/devel/postgres/src/tools/mkldexport/RCS/mkldexport.sh,v 1.2 1994/03/13 04:59:12 aoki Exp
+#
+
+# setting this to nm -B might be better
+# ... due to changes in AIX 4.x ...
+# ... let us search in different directories - Gerhard Reithofer
+if [ -x /usr/ucb/nm ]
+then NM=/usr/ucb/nm
+elif [ -x /usr/bin/nm ]
+then NM=/usr/bin/nm
+elif [ -x /usr/ccs/bin/nm ]
+then NM=/usr/ccs/bin/nm
+elif [ -x /usr/usg/bin/nm ]
+then NM=/usr/usg/bin/nm
+else echo "Fatal error: cannot find `nm' ... please check your installation."
+ exit 1
+fi
+
+CMDNAME=`basename $0`
+if [ -z "$1" ]; then
+ echo "Usage: $CMDNAME object [location]"
+ exit 1
+fi
+OBJNAME=`basename $1`
+if [ "`basename $OBJNAME`" != "`basename $OBJNAME .o`" ]; then
+ OBJNAME=`basename $OBJNAME .o`.so
+fi
+if [ -z "$2" ]; then
+ echo '#!'
+else
+ if [ "$2" = "." ]; then
+ # for the base executable (AIX 4.2 and up)
+ echo '#! .'
+ else
+ echo '#!' $2
+ fi
+fi
+$NM -BCg $1 | \
+ egrep ' [TDB] ' | \
+ sed -e 's/.* //' | \
+ egrep -v '\$' | \
+ sed -e 's/^[.]//' | \
+ sort | \
+ uniq
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index 8a6b6905079..3a8e9dc30b0 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -904,7 +904,9 @@ errcode_for_file_access(void)
/* Wrong object type or state */
case ENOTDIR: /* Not a directory */
case EISDIR: /* Is a directory */
+#if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */
case ENOTEMPTY: /* Directory not empty */
+#endif
edata->sqlerrcode = ERRCODE_WRONG_OBJECT_TYPE;
break;
diff --git a/src/include/port/aix.h b/src/include/port/aix.h
new file mode 100644
index 00000000000..7d08480c8c0
--- /dev/null
+++ b/src/include/port/aix.h
@@ -0,0 +1,4 @@
+/*
+ * src/include/port/aix.h
+ */
+
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index 2f73f9fcf57..5da9b3acda4 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -421,17 +421,15 @@ tas(volatile slock_t *lock)
__asm__ __volatile__(
" lwarx %0,0,%3,1 \n"
" cmpwi %0,0 \n"
-" bne 1f \n"
+" bne $+16 \n" /* branch to li %1,1 */
" addi %0,%0,1 \n"
" stwcx. %0,0,%3 \n"
-" beq 2f \n"
-"1: \n"
+" beq $+12 \n" /* branch to lwsync */
" li %1,1 \n"
-" b 3f \n"
-"2: \n"
+" b $+12 \n" /* branch to end of asm sequence */
" lwsync \n"
" li %1,0 \n"
-"3: \n"
+
: "=&b"(_t), "=r"(_res), "+m"(*lock)
: "r"(lock)
: "memory", "cc");
diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix
new file mode 100644
index 00000000000..d33918f91b9
--- /dev/null
+++ b/src/makefiles/Makefile.aix
@@ -0,0 +1,39 @@
+# MAKE_EXPORTS is required for svr4 loaders that want a file of
+# symbol names to tell them what to export/import.
+MAKE_EXPORTS= true
+
+# -blibpath must contain ALL directories where we should look for libraries
+libpath := $(shell echo $(subst -L,:,$(filter -L/%,$(LDFLAGS))) | sed -e's/ //g'):/usr/lib:/lib
+
+# when building with gcc, need to make sure that libgcc can be found
+ifeq ($(GCC), yes)
+libpath := $(libpath):$(dir $(shell gcc -print-libgcc-file-name))
+endif
+
+rpath = -Wl,-blibpath:'$(rpathdir)$(libpath)'
+
+#LDFLAGS_SL += -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE
+
+# gcc needs to know it's building a shared lib, otherwise it'll not emit
+# correct code / link to the right support libraries
+ifeq ($(GCC), yes)
+LDFLAGS_SL += -shared
+endif
+
+# env var name to use in place of LD_LIBRARY_PATH
+ld_library_path_var = LIBPATH
+
+
+POSTGRES_IMP= postgres.imp
+
+ifdef PGXS
+BE_DLLLIBS= -Wl,-bI:$(pkglibdir)/$(POSTGRES_IMP)
+else
+BE_DLLLIBS= -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP)
+endif
+
+MKLDEXPORT_DIR=src/backend/port/aix
+MKLDEXPORT=$(top_srcdir)/$(MKLDEXPORT_DIR)/mkldexport.sh
+
+%$(DLSUFFIX): %.o
+ $(CC) $(CFLAGS) $*.o $(LDFLAGS) $(LDFLAGS_SL) -o $@ $(BE_DLLLIBS)
diff --git a/src/port/strerror.c b/src/port/strerror.c
index f0746517770..c46b9dc91fc 100644
--- a/src/port/strerror.c
+++ b/src/port/strerror.c
@@ -214,8 +214,10 @@ get_errno_symbol(int errnum)
return "ENOTCONN";
case ENOTDIR:
return "ENOTDIR";
+#if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */
case ENOTEMPTY:
return "ENOTEMPTY";
+#endif
case ENOTSOCK:
return "ENOTSOCK";
#ifdef ENOTSUP
diff --git a/src/template/aix b/src/template/aix
new file mode 100644
index 00000000000..48a3ce55cf7
--- /dev/null
+++ b/src/template/aix
@@ -0,0 +1,7 @@
+# src/template/aix
+
+# Extra CFLAGS for code that will go into a shared library
+CFLAGS_SL=""
+
+# Native memset() is faster.
+MEMSET_LOOP_LIMIT=0
--
2.41.0
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-04-04 20:44 Heikki Linnakangas <[email protected]>
parent: Srirama Kucherlapati <[email protected]>
0 siblings, 1 reply; 29+ messages in thread
From: Heikki Linnakangas @ 2025-04-04 20:44 UTC (permalink / raw)
To: Srirama Kucherlapati <[email protected]>; wenhui qiu <[email protected]>; [email protected] <[email protected]>; pgsql-hackers; +Cc: Robert Haas <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>
On 04/04/2025 22:31, Srirama Kucherlapati wrote:
> - src/backend/port/aix/mkldexport.sh>
> - When building shared libraries from various archives on AIX, we encounter a
> situation where symbols are not exported. To resolve this, we require an export
> file. For instance, the command is used to export symbols.
>
> gcc -shared libtest.so libtest.a -Wl,-bE:test.exp
>
> However, if we directly provide object files in the command line instead of an
> archive, the symbols will be exported automatically, as demonstrated by the command
>
> gcc -shared libtest.so test1.o test2.o test3.o.
Oh, that's interesting. So if we do that, we don't need mkldepxort.sh
anymore?
> - WRT to the MEMSET_LOOP_LIMIT flag, this is set to “0”, which would
> internally use
>
> The system call memset() as mentioned in the below link as well
>
> https://www.postgresql.org/message-
> id/20060203135315.E08B09DC816%40postgresql.org <https://
> www.postgresql.org/message-id/20060203135315.E08B09DC816%40postgresql.org>
Yes, I understand what it does. But why? Whatever benchmarking was done
back in 2006 by is no longer relevant.
> With all the above changes we have built and ran the tests. As of now we see
>
> there is only one test case that is failing, which seems to have been
>
> introduced recently. And this might not be related to the above changes as
>
> earlier there were no test cases failing.
>
> 64 not ok 12 + float8 235 ms
>
> 297 # 1 of 226 tests failed.
>
> 20 +ERROR: value out of range: overflow
>
> 21 -- test overflow/underflow handling
>
> 22 SELECT gamma(float8 '-infinity');
>
> 23 ERROR: value out of range: overflow
Yeah, that function is new. I don't know if it's a pre-existing problem
or something specific to AIX. Please check the archives for prior
discussion on that; if you can reproduce it, maybe you can help to fix it?
> 12 files changed, 224 insertions(+), 20 deletions(-)
I'm glad to see this patch shrinking :-)
> diff --git a/src/include/port/aix.h b/src/include/port/aix.h
> new file mode 100644
> index 00000000000..7d08480c8c0
> --- /dev/null
> +++ b/src/include/port/aix.h
> @@ -0,0 +1,4 @@
> +/*
> + * src/include/port/aix.h
> + */
> +
Useless.
> diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
> index 2f73f9fcf57..5da9b3acda4 100644
> --- a/src/include/storage/s_lock.h
> +++ b/src/include/storage/s_lock.h
> @@ -421,17 +421,15 @@ tas(volatile slock_t *lock)
> __asm__ __volatile__(
> " lwarx %0,0,%3,1 \n"
> " cmpwi %0,0 \n"
> -" bne 1f \n"
> +" bne $+16 \n" /* branch to li %1,1 */
> " addi %0,%0,1 \n"
> " stwcx. %0,0,%3 \n"
> -" beq 2f \n"
> -"1: \n"
> +" beq $+12 \n" /* branch to lwsync */
> " li %1,1 \n"
> -" b 3f \n"
> -"2: \n"
> +" b $+12 \n" /* branch to end of asm sequence */
> " lwsync \n"
> " li %1,0 \n"
> -"3: \n"
> +
> : "=&b"(_t), "=r"(_res), "+m"(*lock)
> : "r"(lock)
> : "memory", "cc");
Why is this change needed?
Yes, I know we've been over this many times already. I still don't
understand why it's needed. The onus is on you to explain it adequately,
in comments in the patch, so that I and others understand it. Or even
better, remove it if it's not necessary.
> diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix
> new file mode 100644
> index 00000000000..d33918f91b9
> --- /dev/null
> +++ b/src/makefiles/Makefile.aix
> @@ -0,0 +1,39 @@
> +# MAKE_EXPORTS is required for svr4 loaders that want a file of
> +# symbol names to tell them what to export/import.
> +MAKE_EXPORTS= true
Oh this is interesting. I think MAKE_EXPORTS is actually a leftover that
I failed to remove when I removed the AIX support; it's not used on any
currently-supported platform.
> +# -blibpath must contain ALL directories where we should look for libraries
> +libpath := $(shell echo $(subst -L,:,$(filter -L/%,$(LDFLAGS))) | sed -e's/ //g'):/usr/lib:/lib
Is this still sensible on modern AIX systems? What happens if you leave
it out?
> +# when building with gcc, need to make sure that libgcc can be found
> +ifeq ($(GCC), yes)
> +libpath := $(libpath):$(dir $(shell gcc -print-libgcc-file-name))
> +endif
Same here. Still relevant? What happens if you leave it out?
> +# gcc needs to know it's building a shared lib, otherwise it'll not emit
> +# correct code / link to the right support libraries
> +ifeq ($(GCC), yes)
> +LDFLAGS_SL += -shared
> +endif
On other platforms, we have this in LINK.shared, see src/Makefile.shlib.
Should we do the same on AIX; if not, why not?
> +# env var name to use in place of LD_LIBRARY_PATH
> +ld_library_path_var = LIBPATH
Does AIX have LD_LIBRARY_PATH? This suggests that it does:
https://www.ibm.com/support/pages/aix-libpath-recommendations
What's the difference between LIBPATH and LD_LIBRARY_PATH? Why prefer
LIBPATH?
Separately from the remaining issues with this patch, I still feel
pretty reluctant with accepting this, because if I commit this patch,
I'm on the hook to keep it working. I do regularly commit stuff that I'm
not personally that interested in, but a new port is different:
If something breaks on AIX, I have no means (or interest!) in debugging
it. That means that I need to be pretty confident that there are others
who are interested and invested in keeping working, take ownership, will
help to debug problems in a timely fashion, and can submit high-quality
fixes. I am not seeing that.
I also notice that all the AIX systems we have in the buildfarm are still:
- maintained by Noah, who - correct me if I'm wrong - is not
particularly interested in AIX or keen on maintaining them
- are on AIX 7.1.5, which I believe is already end-of-line
- running on power7 hardware which is 15 years old.
That's not very reassuring.
--
Heikki Linnakangas
Neon (https://neon.tech)
^ permalink raw reply [nested|flat] 29+ messages in thread
* RE: AIX support
@ 2025-04-05 18:29 Srirama Kucherlapati <[email protected]>
parent: Heikki Linnakangas <[email protected]>
0 siblings, 1 reply; 29+ messages in thread
From: Srirama Kucherlapati @ 2025-04-05 18:29 UTC (permalink / raw)
To: Heikki Linnakangas <[email protected]>; pgsql-hackers; +Cc: Robert Haas <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>; wenhui qiu <[email protected]>; [email protected] <[email protected]>
--_004_CY8PR15MB5602EADE20375FB66090B61BDBA82CY8PR15MB5602namp_
Content-Type: multipart/alternative;
boundary="_000_CY8PR15MB5602EADE20375FB66090B61BDBA82CY8PR15MB5602namp_"
--_000_CY8PR15MB5602EADE20375FB66090B61BDBA82CY8PR15MB5602namp_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi Heikki,
Please find the attached patch addressing the provided comments. Our respon=
ses are outlined below.
>> - src/backend/port/aix/mkldexport.sh>
> Oh, that's interesting. So if we do that, we don't need mkldepxort.sh
> anymore?
Here the better approach still would be to use the script to extract the
symbols build the corresponding shared libraries. As we see there are
lot of extensions that are getting built using the symbols exported from
"postges" binary, we need to definitely use the script to extract the symb=
ols
and import them while building the library extensions.
>> - WRT to the MEMSET_LOOP_LIMIT flag, this is set to =930=94, which would
>> internally use
> Yes, I understand what it does. But why? Whatever benchmarking was done
> back in 2006 by is no longer relevant.
We ran the program , mentioned in the below link and collected the
benchmark stats on our node (POWER_10).
https://postgrespro.com/list/thread-id/1673194
The native AIX memset() seems to performs better. The benchmark seems to be=
still
relevant, so I think we should continue to use the existing optimization fo=
r
AIX. Below are the stats (64bit Object mode).
>> ./memset-aix
sizeof(int) =3D 4
sizeof(long) =3D 8
Loop by int (size=3D8) : 0.238024
memset by int (size=3D8) : 0.280301
Loop by long (size=3D8) : 0.202650
Loop by int (size=3D16) : 0.389846
memset by int (size=3D16) : 0.280979
Loop by long (size=3D16) : 0.246879
Loop by int (size=3D32) : 0.773478
memset by int (size=3D32) : 0.331691
Loop by long (size=3D32) : 0.422261
Loop by int (size=3D64) : 1.945150
memset by int (size=3D64) : 0.319117
Loop by long (size=3D64) : 0.769770
Loop by int (size=3D128) : 4.517186
memset by int (size=3D128) : 0.398292
Loop by long (size=3D128) : 1.982307
Loop by int (size=3D256) : 12.486661
memset by int (size=3D256) : 0.463115
Loop by long (size=3D256) : 4.526272
Loop by int (size=3D512) : 24.433075
memset by int (size=3D512) : 0.681426
Loop by long (size=3D512) : 12.564701
Loop by int (size=3D1024) : 48.060486
memset by int (size=3D1024) : 0.904048
Loop by long (size=3D1024) : 24.149871
Loop by int (size=3D2048) : 96.288018
memset by int (size=3D2048) : 1.509465
Loop by long (size=3D2048) : 48.216079
Loop by int (size=3D4096) : 191.847177
memset by int (size=3D4096) : 1.435403
Loop by long (size=3D4096) : 96.433072
>> 12 files changed, 224 insertions(+), 20 deletions(-)
> I'm glad to see this patch shrinking :-)
Thanks for your suggestions, yes it further shrinked.
> > diff --git a/src/include/port/aix.h b/src/include/port/aix.h
> Useless.
I too initially felt this was not needed, This file is still required as th=
e below file is
getting auto generated. I attempted to remove it; the below error is hit.
so this is still required.
64 ../../src/include/c.h:59:10: fatal error: pg_config_os.h: No such f=
ile or directory
65 59 | #include "pg_config_os.h" /* config from incl=
ude/port/PORTNAME.h */
66 | ^~~~~~~~~~~~~~~~
> diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
> Why is this change needed?
> Yes, I know we've been over this many times already. I still don't
> understand why it's needed. The onus is on you to explain it adequately,
> in comments in the patch, so that I and others understand it. Or even
> better, remove it if it's not necessary.
If you recall, we previously considered replacing this assembly code with
__sync_lock_test_and_set(). However, as you mentioned earlier, this should =
be
handled in a separate patch. For now, I'll make a note and submit a separat=
e
patch for this later, as originally planned. Below is the reference to olde=
r
discussion.
https://www.postgresql.org/message-id/7751f9c5-e2e6-4252-a9fa-14b3e78ddec9%=
40iki.fi
>> diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix
>> +MAKE_EXPORTS=3D true
>Oh this is interesting. I think MAKE_EXPORTS is actually a leftover that
>I failed to remove when I removed the AIX support; it's not used on any
>currently-supported platform.
Removed it and its working fine.
>> +# -blibpath must contain ALL directories where we should look for libra=
ries
>> +libpath :=3D $(shell echo $(subst -L,:,$(filter -L/%,$(LDFLAGS))) | sed=
-e's/ //g'):/usr/lib:/lib
> Is this still sensible on modern AIX systems? What happens if you leave
> it out?
This is required as it is looking for the possible non-default directories =
for the linker
at the runtime. This is used along with rpath. As suggested, I tested this =
by removing
the libpath, but at run time the linker is not able to find the dependent l=
ibraries path
as a result, the binaries are not getting loaded. After doing some research=
, AIX uses a stricter,
more explicit approach. The runtime linker expects to tell it exactly where=
to look using -blibpath.
>> +# when building with gcc, need to make sure that libgcc can be found
>> +ifeq ($(GCC), yes)
>> +libpath :=3D $(libpath):$(dir $(shell gcc -print-libgcc-file-name))
>> +endif
> Same here. Still relevant? What happens if you leave it out?
Removed it and it is working fine.
>> +# gcc needs to know it's building a shared lib, otherwise it'll not emi=
t
>> +# correct code / link to the right support libraries
>> +ifeq ($(GCC), yes)
>> +LDFLAGS_SL +=3D -shared
>> +endif
>On other platforms, we have this in LINK.shared, see src/Makefile.shlib.
>Should we do the same on AIX; if not, why not?
I tried your suggestion to move the gcc "LDFLAGS_SL +=3D -shared" flag to M=
akefile.shlib,
"LINK.shared =3D $(COMPILER) -shared", but there are some extensions =
dependent
on this in "contrib" which are not building with =93-shared=94 flag, as a r=
esult a testcase
is failing to load this library "contrib/spi/autoinc.so" . Below is the err=
or.
not ok 78 + triggers 2443 ms
31 +ERROR: incompatible library "/home/pgdev/pgdb/postgres/src/test/regres=
s/autoinc.so": missing magic block
32 +HINT: Extension libraries are required to use the PG_MODULE_MAGIC macr=
o.
I noticed that the =93-shared=94 flag was missing while building the contri=
b/spi/autoinc.so library.
I tried to add the =93include $(top_builddir)/src/Makefile.shlib=94 in the
contrib/spi/Makefile, but still the =93-shared=94 flag is not getting inclu=
ded while building
the library.
So we will continue to use the earlier change.
> Does AIX have LD_LIBRARY_PATH? This suggests that it does:
> https://www.ibm.com/support/pages/aix-libpath-recommendations
> What's the difference between LIBPATH and LD_LIBRARY_PATH? Why prefer
LIBPATH?
AIX uses only LIBPATH and LD_LIBRARY_PATH is specific to Linux.
> Separately from the remaining issues with this patch, I still feel
> pretty reluctant with accepting this, because if I commit this patch,
> I'm on the hook to keep it working. I do regularly commit stuff that I'm
> not personally that interested in, but a new port is different:
> If something breaks on AIX, I have no means (or interest!) in debugging
> it. That means that I need to be pretty confident that there are others
> who are interested and invested in keeping working, take ownership, will
> help to debug problems in a timely fashion, and can submit high-quality
> fixes. I am not seeing that.
I completely understand your concerns about committing to a new port and
ensuring its long-term maintenance.
Our team would like to extend the support to maintain PostgreSQL on AIX.
We would like to assist by timely debugging and resolving any issues on AIX=
.
We=92re also keen to actively contribute to this effort.
> I also notice that all the AIX systems we have in the buildfarm are still=
:
> - maintained by Noah, who - correct me if I'm wrong - is not
> particularly interested in AIX or keen on maintaining them
> - are on AIX 7.1.5, which I believe is already end-of-line
> - running on power7 hardware which is 15 years old.
> That's not very reassuring.
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-04-07 10:04 Heikki Linnakangas <[email protected]>
parent: Srirama Kucherlapati <[email protected]>
0 siblings, 2 replies; 29+ messages in thread
From: Heikki Linnakangas @ 2025-04-07 10:04 UTC (permalink / raw)
To: Srirama Kucherlapati <[email protected]>; pgsql-hackers; +Cc: Robert Haas <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>; wenhui qiu <[email protected]>; [email protected] <[email protected]>
On 05/04/2025 21:29, Srirama Kucherlapati wrote:
>>> - WRT to the MEMSET_LOOP_LIMIT flag, this is set to “0”, which would
>>> internally use
>
>> Yes, I understand what it does. But why? Whatever benchmarking was done
>> back in 2006 by is no longer relevant.
>
> We ran the program , mentioned in the below link and collected the
> benchmark stats on our node (POWER_10).
>
> https://postgrespro.com/list/thread-id/1673194 <https://postgrespro.com/
> list/thread-id/1673194>
>
> The native AIX memset() seems to performs better. The benchmark seems to
> be still relevant, so I think we should continue to use the existing optimization for
> AIX.
At least it needs to be updated to match what MemSet() looks like
nowadays. The changes may be just cosmetic, but better check. Should
also check the effect on MemSetAligned(). That might matter more for
performance in practice.
A third thing to check is the performance of MemSet() when the pointer
is, in fact, aligned.
The other question is what do the results look like on other platforms?
How much difference does the libc implementation make, vs. the compiler
and CPU architecture? If the difference is related to compiler or CPU
architecture, then this doesn't belong in the AIX template, but
somewhere else.
> Below are the stats (64bit Object mode).
>
>>> ./memset-aix
>
> sizeof(int) = 4
> sizeof(long) = 8
MemSet() uses 'long', so the int tests are not relevant. I have omitted
them below.
> memset by int (size=8) : 0.280301
> Loop by long (size=8) : 0.202650
>
> memset by int (size=16) : 0.280979
> Loop by long (size=16) : 0.246879
>
> memset by int (size=32) : 0.331691
> Loop by long (size=32) : 0.422261
Ok, MemSet() is faster with very small sizes, the crossover is somewhere
between 16 and 32 bytes.
I'm actually surprised the compiler doesn't replace the memset() call
with a few store instructions with these sizes.
> memset by int (size=1024) : 0.904048
> Loop by long (size=1024) : 24.149871
So with larger sizes, memset() wins hands down.
I'm surprised how big the difference is, because I actually expected the
compiler to detect the memory-zeroing loop and replace it with some
fancy vector instructions (does powerpc have any?). Or a call to
memset(); I've seen compilers convert loops to memset() and vice versa.
My gut feeling is actually that we should remove the MemSet() macro
altogether and just use memset() everywhere. The compilers are much
better at optimizing it in year 2025 than they were back in 2002. I'd
love to see some rigorous benchmarks across different platforms and
compilers to demonstrate that, and then just get rid of MemSet().
MemSetAligned() might still be worth keeping. Sometimes we know that a
piece of memory is aligned, but the compiler does not. But maybe even
that should just assert and hint the compiler that the input is aligned,
and then call memset().
If you'd like to help the community in general, if you could do some
more rigorous benchmarking along those lines, not just for AIX, and
start a new thread to discuss that, that'd be much appreciated. That
would be the best way to resolve this.
For the more narrow question of what should the AIX template do, that
comes down to whether there's some *AIX-specific* performance
difference. The generated powerpc assembly code is presumably the same
on AIX and other operating systems, so it comes down to whether there's
some big difference in AIX's memset() implementation vs. glibc's.
>> diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
>
>> Why is this change needed?
>
>> Yes, I know we've been over this many times already. I still don't
>> understand why it's needed. The onus is on you to explain it adequately,
>> in comments in the patch, so that I and others understand it. Or even
>> better, remove it if it's not necessary.
>
> If you recall, we previously considered replacing this assembly code
> with __sync_lock_test_and_set(). However, as you mentioned earlier,
> this should be handled in a separate patch. For now, I'll make a
> note and submit a separate patch for this later, as originally
> planned. Below is the reference to older discussion.
Yes, I do recall. Please read again my comment above: this all needs to
be explained in comments in the code.
To be precise, I have these questions:
- Does GCC on AIX (still) use the IBM assembler?
- Does the IBM assembler still not understand the label syntax?
- Is there some other label syntax that would work on the IBM assembler?
- Is it possible to use the GNU assembler instead?
>>> +# -blibpath must contain ALL directories where we should look for libraries
>>> +libpath := $(shell echo $(subst -L,:,$(filter -L/%,$(LDFLAGS))) | sed -e's/ //g'):/usr/lib:/lib
>
>> Is this still sensible on modern AIX systems? What happens if you leave
>> it out?
>
> This is required as it is looking for the possible non-default
> directories for the linker at the runtime. This is used along with
> rpath. As suggested, I tested this by removing the libpath, but at
> run time the linker is not able to find the dependent libraries path
> as a result, the binaries are not getting loaded. After doing some
> research, AIX uses a stricter, more*explicit* approach. The runtime
> linker expects to tell it exactly where to look using -blibpath.
Ok, some comments would be in order to explain that, maybe with links to
the relevant AIX documentation.
--
Heikki Linnakangas
Neon (https://neon.tech)
^ permalink raw reply [nested|flat] 29+ messages in thread
* RE: AIX support
@ 2025-04-12 16:41 Srirama Kucherlapati <[email protected]>
parent: Heikki Linnakangas <[email protected]>
1 sibling, 2 replies; 29+ messages in thread
From: Srirama Kucherlapati @ 2025-04-12 16:41 UTC (permalink / raw)
To: Heikki Linnakangas <[email protected]>; pgsql-hackers; +Cc: Robert Haas <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>; wenhui qiu <[email protected]>; [email protected] <[email protected]>
Here are some stats wrt to loop and native memset after enabling optimization with the same test tool(tested for long and long align using MemSetAligned). Corresponding glibc is linked on PPcle and AIX libc is linked on AIX.
https://postgrespro.com/list/thread-id/1673194
AIX loop-1 PPCle - loop1 AIX loop-2 PPCle - loop2
Loop by long (size=8) : 0 0 0.000001 0
Loop Align by long (size=8) : 0 0 0 0
memset by long (size=8) : 0.00999 0.010229 0.00994 0.010211
Loop by long (size=16) : 0 0 0 0
Loop Align by long (size=16) : 0 0 0 0
memset by long (size=16) : 0.010082 0.010036 0.010094 0.01003
Loop by long (size=32) : 0.32903 0.227726 0.329027 0.227707
Loop Align by long (size=32) : 0.329486 0.227705 0.328932 0.227712
memset by long (size=32) : 0.021061 0.01064 0.021115 0.01064
Loop by long (size=64) : 0.334761 0.227714 0.34326 0.227688
Loop Align by long (size=64) : 0.329005 0.236937 0.329084 0.236906
memset by long (size=64) : 0.059559 0.025612 0.053004 0.029589
Loop by long (size=128) : 0.420381 0.329634 0.420332 0.329524
Loop Align by long (size=128) : 0.420376 0.337169 0.42022 0.337162
memset by long (size=128) : 0.420153 0.098774 0.420312 0.101888
Loop by long (size=256) : 0.472187 0.428049 0.472774 0.429217
Loop Align by long (size=256) : 0.472586 0.438316 0.472447 0.438325
memset by long (size=256) : 0.473731 0.428013 0.473864 0.42759
Loop by long (size=512) : 0.676089 0.435649 0.632774 0.43574
Loop Align by long (size=512) : 0.66702 0.428013 0.630751 0.427319
memset by long (size=512) : 0.666619 0.427989 0.691485 0.427263
Loop by long (size=1024) : 1.00773 0.45079 0.925212 0.452131
Loop Align by long (size=1024) : 0.92114 0.45084 0.920574 0.452994
memset by long (size=1024) : 0.935062 0.450821 0.917 0.452396
Loop by long (size=2048) : 1.52585 0.702127 1.265107 0.701822
Loop Align by long (size=2048) : 1.57524 0.702158 1.439109 0.702651
memset by long (size=2048) : 1.614771 0.702247 1.384672 0.701857
Loop by long (size=4096) : 1.418133 1.37568 1.325803 1.376005
Loop Align by long (size=4096) : 1.421619 1.375741 1.325743 1.376071
memset by long (size=4096) : 1.423404 1.375716 1.325666 1.376091
After enabling optimization levels, both are performing similar.
As both are performing similar we have removed the MEMSET_LOOP in the AIX template and tried the below benchmark after running pgbench.
Run#1
>> pgbench -c 50 -p 5678 -d postgres -T 180 -r -P 10 -L 10 -j 20
pgbench (18devel)
starting vacuum...end.
progress: 10.0 s, 2603.2 tps, lat 18.692 ms stddev 61.947, 0 failed
progress: 20.0 s, 3373.2 tps, lat 14.841 ms stddev 17.724, 0 failed
progress: 30.0 s, 2599.6 tps, lat 19.222 ms stddev 99.307, 0 failed
progress: 40.0 s, 3531.3 tps, lat 14.159 ms stddev 14.786, 0 failed
progress: 50.0 s, 2561.3 tps, lat 15.180 ms stddev 33.532, 0 failed
progress: 60.0 s, 3315.4 tps, lat 18.421 ms stddev 111.988, 0 failed
progress: 70.0 s, 3517.4 tps, lat 14.203 ms stddev 14.931, 0 failed
progress: 80.0 s, 2023.4 tps, lat 21.858 ms stddev 125.718, 0 failed
progress: 90.0 s, 3472.1 tps, lat 16.049 ms stddev 55.152, 0 failed
progress: 100.0 s, 3580.5 tps, lat 13.966 ms stddev 14.636, 0 failed
progress: 110.0 s, 2823.4 tps, lat 14.572 ms stddev 20.433, 0 failed
progress: 120.0 s, 3140.3 tps, lat 18.717 ms stddev 120.447, 0 failed
progress: 130.0 s, 3488.4 tps, lat 14.329 ms stddev 15.057, 0 failed
progress: 140.0 s, 2503.7 tps, lat 19.966 ms stddev 125.551, 0 failed
progress: 150.0 s, 3083.3 tps, lat 16.212 ms stddev 56.652, 0 failed
progress: 160.0 s, 3572.0 tps, lat 13.991 ms stddev 14.660, 0 failed
progress: 170.0 s, 3642.2 tps, lat 13.722 ms stddev 14.507, 0 failed
progress: 180.0 s, 2453.6 tps, lat 20.364 ms stddev 133.126, 0 failed
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 50
query mode: simple
number of clients: 50
number of threads: 20
maximum number of tries: 1
duration: 180 s
number of transactions actually processed: 552889
number of failed transactions: 0 (0.000%)
number of transactions above the 10.0 ms latency limit: 227816/552889 (41.205%)
latency average = 16.252 ms
latency stddev = 69.656 ms
initial connection time = 237.245 ms
tps = 3074.421213 (without initial connection time)
statement latencies in milliseconds and failures:
0.002 0 \set aid random(1, 100000 * :scale)
0.001 0 \set bid random(1, 1 * :scale)
0.001 0 \set tid random(1, 10 * :scale)
0.001 0 \set delta random(-5000, 5000)
1.090 0 BEGIN;
3.153 0 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;
1.462 0 SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
2.012 0 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;
4.060 0 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;
1.224 0 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_T
3.246 0 END;
Run#2
>> pgbench -c 50 -p 5678 -d postgres -T 180 -r -P 10 -L 10 -j 20
pgbench (18devel)
starting vacuum...end.
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 50
query mode: simple
number of clients: 50
number of threads: 20
maximum number of tries: 1
duration: 180 s
number of transactions actually processed: 577290
number of failed transactions: 0 (0.000%)
number of transactions above the 10.0 ms latency limit: 234815/577290 (40.675%)
latency average = 15.558 ms
latency stddev = 65.428 ms
initial connection time = 314.109 ms
tps = 3211.642930 (without initial connection time)
statement latencies in milliseconds and failures:
0.002 0 \set aid random(1, 100000 * :scale)
0.001 0 \set bid random(1, 1 * :scale)
0.001 0 \set tid random(1, 10 * :scale)
0.001 0 \set delta random(-5000, 5000)
1.084 0 BEGIN;
2.761 0 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;
1.371 0 SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
2.000 0 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;
4.014 0 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;
1.229 0 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_T
3.093 0 END;
>> diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
> - Does GCC on AIX (still) use the IBM assembler?
> - Does the IBM assembler still not understand the label syntax?
> - Is there some other label syntax that would work on the IBM assembler?
> - Is it possible to use the GNU assembler instead?
GCC on AIX still uses the AIX native assembler only. The GNU assembler has some level of support in AIX through some of the patches. But still GCC/gnu assembler combination is not very much tested.
We removed AIX specific changes for TAS(), which would now use the __sync_lock_test_and_set() routines directly instead, and we ran pgbench on it.
+ pgbench -c 50 -p 5678 -d postgres -T 180 -r -P 10 -L 10 -j 20
pgbench (18devel)
starting vacuum...end.
scaling factor: 50
query mode: simple
number of clients: 50
number of threads: 20
maximum number of tries: 1
duration: 180 s
number of transactions actually processed: 550838
number of failed transactions: 0 (0.000%)
number of transactions above the 10.0 ms latency limit: 227805/550838 (41.356%)
latency average = 16.323 ms
latency stddev = 68.404 ms
initial connection time = 235.449 ms
tps = 3061.041640 (without initial connection time)
statement latencies in milliseconds and failures:
0.002 0 \set aid random(1, 100000 * :scale)
0.001 0 \set bid random(1, 1 * :scale)
0.001 0 \set tid random(1, 10 * :scale)
0.001 0 \set delta random(-5000, 5000)
1.098 0 BEGIN;
2.993 0 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;
1.501 0 SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
2.004 0 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;
4.127 0 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;
1.238 0 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);
3.356 0 END;
> 21 -- test overflow/underflow handling
>
> 22 SELECT gamma(float8 '-infinity');
>
> 23 ERROR: value out of range: overflow
WRT failure in lgamma(), we worked with the libm team to resolve it. It’s an issue with the errno that is being set. I’ll work on the testcase.
>> ./gamma-test NaN
Gamma and natural logarithm of gamma for the input values:
Gamma(NaNS) = NaNQ errno: 34
lgamma(NaNS) = NaNQ errno: 34
With fixed libm
+ ./gamma-test NaN
Gamma and natural logarithm of gamma for the input values:
Gamma(NaNS) = NaNQ errno: 0
lgamma(NaNS) = NaNQ errno: 0
Warm Regards,
Sriram
^ permalink raw reply [nested|flat] 29+ messages in thread
* RE: AIX support
@ 2025-04-12 17:09 Srirama Kucherlapati <[email protected]>
parent: Srirama Kucherlapati <[email protected]>
1 sibling, 0 replies; 29+ messages in thread
From: Srirama Kucherlapati @ 2025-04-12 17:09 UTC (permalink / raw)
To: Heikki Linnakangas <[email protected]>; pgsql-hackers; +Cc: Robert Haas <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>; wenhui qiu <[email protected]>; [email protected] <[email protected]>
Working on the patch. I will update you.
-Sriram.
^ permalink raw reply [nested|flat] 29+ messages in thread
* RE: AIX support
@ 2025-04-15 16:20 Srirama Kucherlapati <[email protected]>
parent: Srirama Kucherlapati <[email protected]>
1 sibling, 1 reply; 29+ messages in thread
From: Srirama Kucherlapati @ 2025-04-15 16:20 UTC (permalink / raw)
To: Heikki Linnakangas <[email protected]>; pgsql-hackers; +Cc: Robert Haas <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>; wenhui qiu <[email protected]>; [email protected] <[email protected]>
Hi Team, Please find the attached diff with the latest changes.
The diff file changes that were done for memset and spinlock, are modified
on top of the previous patch.
New changes for review: 0001-AIX-support.tas.memset.diffs
Previous patch: 0001-AIX-support.v8.patch
>> diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
>
We have replaced the asm code with the gcc specific routines __sync_lock_test_and_set ()
and ran the pgbench. On AIX both have the similar performance, On PPcle we see a slight
variation in the performance. It seems the asm code is performing better on PPCle. Please
let us know, would it be better to continue to use the PPC assemble code over gcc routines.
Attached are the complete stats. (spinlock.stats.log)
Below is the summary…
AIX With asm AIX With __sync PPCle With asm PPCle With __sync
number of transactions "226554/ "230810/ "356945/ "364346/
above the 10.0 ms 556329 567936 918647 863937
latency limit (40.723%)" (40.640%)" (38.856%)" (42.173%)"
latency average 16.160 ms 15.821 ms 9.796 ms 10.416 ms
initial connection time 230.786 ms 249.668 ms 19.606 ms 20.090 ms
tps 3086.209412 3158.14915 5103.024267 4799.621896
> diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix
>
> At least it needs to be updated to match what MemSet() looks like
> nowadays. The changes may be just cosmetic, but better check. Should
> also check the effect on MemSetAligned(). That might matter more for
> performance in practice.
As per the stats in the previous mail wrt to memset, both the loop and the native
memset are performing similar after optimization “-O2”. So for now we removed the
native memset changes.
We will setup the memset performance on different platforms and will post the
details in a different thread.
>>> +# -blibpath must contain ALL directories where we should look for libraries
>>> +libpath := $(shell echo $(subst -L,:,$(filter -L/%,$(LDFLAGS))) | sed -e's/ //g'):/usr/lib:/lib
>
Added additional details about the -blibpath usage. These details are available in the below link
https://download.boulder.ibm.com/ibmdl/pub/software/dw/aix/es-aix_ll.pdf
> 21 -- test overflow/underflow handling
>
> 22 SELECT gamma(float8 '-infinity');
>
> 23 ERROR: value out of range: overflow
This testcase is resolved from AIX libm side. Below is the result.
postgres=#
SELECT x, gamma(x),lgamma(x)
FROM (VALUES (0.5), (1), (2), (3), (4), (5),
(float8 'infinity'), (float8 'nan')) AS t(x);
0.5 | 1.772453850905516 | 0.5723649429247001
1 | 1 | 0
2 | 1 | 0
3 | 2 | 0.6931471805599453
4 | 6 | 1.791759469228055
5 | 24 | 3.1780538303479458
Infinity | Infinity | Infinity
NaN | NaN | NaN
Kindly let us know your feedback on the diffs.
I will commit the diffs to the patch(0001-AIX-support.v8.patch) once you are fine.
Warm regards,
Sriram.
------------------------------------------
AIX with asm spin lock
>> pgbench -c 50 -p 5678 -d postgres -T 180 -r -P 10 -L 10 -j 20
pgbench (18devel)
starting vacuum...end.
progress: 10.0 s, 3181.5 tps, lat 15.331 ms stddev 17.867, 0 failed
progress: 20.0 s, 3277.2 tps, lat 14.730 ms stddev 18.792, 0 failed
progress: 30.0 s, 2642.9 tps, lat 19.556 ms stddev 106.940, 0 failed
progress: 40.0 s, 3614.3 tps, lat 13.830 ms stddev 14.673, 0 failed
progress: 50.0 s, 2355.4 tps, lat 21.208 ms stddev 132.907, 0 failed
progress: 60.0 s, 3046.8 tps, lat 16.407 ms stddev 53.507, 0 failed
progress: 70.0 s, 3640.1 tps, lat 13.734 ms stddev 14.549, 0 failed
progress: 80.0 s, 2435.2 tps, lat 20.518 ms stddev 125.603, 0 failed
progress: 90.0 s, 3576.3 tps, lat 13.977 ms stddev 14.341, 0 failed
progress: 100.0 s, 3653.9 tps, lat 13.681 ms stddev 14.554, 0 failed
progress: 110.0 s, 2414.6 tps, lat 20.684 ms stddev 134.585, 0 failed
progress: 120.0 s, 3051.6 tps, lat 16.383 ms stddev 63.253, 0 failed
progress: 130.0 s, 3657.2 tps, lat 13.667 ms stddev 14.375, 0 failed
progress: 140.0 s, 3159.0 tps, lat 14.259 ms stddev 18.915, 0 failed
progress: 150.0 s, 2889.8 tps, lat 19.006 ms stddev 121.852, 0 failed
progress: 160.0 s, 3649.0 tps, lat 13.693 ms stddev 14.288, 0 failed
progress: 170.0 s, 2799.8 tps, lat 14.552 ms stddev 17.307, 0 failed
progress: 180.0 s, 2582.9 tps, lat 22.914 ms stddev 121.785, 0 failed
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 50
query mode: simple
number of clients: 50
number of threads: 20
maximum number of tries: 1
duration: 180 s
number of transactions actually processed: 556329
number of failed transactions: 0 (0.000%)
number of transactions above the 10.0 ms latency limit: 226554/556329 (40.723%)
latency average = 16.160 ms
latency stddev = 69.085 ms
initial connection time = 230.786 ms
tps = 3086.209412 (without initial connection time)
statement latencies in milliseconds and failures:
0.002 0 \set aid random(1, 100000 * :scale)
0.001 0 \set bid random(1, 1 * :scale)
0.001 0 \set tid random(1, 10 * :scale)
0.001 0 \set delta random(-5000, 5000)
1.084 0 BEGIN;
2.997 0 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;
1.400 0 SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
2.014 0 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;
4.094 0 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;
1.217 0 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);
3.346 0 END;
------------------------------------------
AIX with __sync_lock_test_and_set
pgdev@roxxpg2:~/pgdb/postgres/install]
>> pgbench -c 50 -p 5678 -d postgres -T 180 -r -P 10 -L 10 -j 20
pgbench (18devel)
starting vacuum...end.
progress: 10.0 s, 3391.8 tps, lat 14.339 ms stddev 13.922, 0 failed
progress: 20.0 s, 2724.0 tps, lat 18.350 ms stddev 96.241, 0 failed
progress: 30.0 s, 3571.4 tps, lat 14.001 ms stddev 14.957, 0 failed
progress: 40.0 s, 2630.9 tps, lat 18.993 ms stddev 115.583, 0 failed
progress: 50.0 s, 3574.5 tps, lat 13.984 ms stddev 14.838, 0 failed
progress: 60.0 s, 3577.0 tps, lat 13.973 ms stddev 15.055, 0 failed
progress: 70.0 s, 2401.7 tps, lat 20.810 ms stddev 149.104, 0 failed
progress: 80.0 s, 2891.0 tps, lat 17.291 ms stddev 73.637, 0 failed
progress: 90.0 s, 3529.0 tps, lat 14.160 ms stddev 15.212, 0 failed
progress: 100.0 s, 2637.2 tps, lat 18.951 ms stddev 111.379, 0 failed
progress: 110.0 s, 3593.1 tps, lat 13.903 ms stddev 14.604, 0 failed
progress: 120.0 s, 3560.3 tps, lat 14.048 ms stddev 14.926, 0 failed
progress: 130.0 s, 3230.5 tps, lat 13.796 ms stddev 15.330, 0 failed
progress: 140.0 s, 2293.2 tps, lat 24.154 ms stddev 163.908, 0 failed
progress: 150.0 s, 3511.8 tps, lat 14.219 ms stddev 15.367, 0 failed
progress: 160.0 s, 3612.9 tps, lat 13.836 ms stddev 14.839, 0 failed
progress: 170.0 s, 2523.9 tps, lat 19.811 ms stddev 129.520, 0 failed
progress: 180.0 s, 3533.7 tps, lat 14.136 ms stddev 14.988, 0 failed
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 50
query mode: simple
number of clients: 50
number of threads: 20
maximum number of tries: 1
duration: 180 s
number of transactions actually processed: 567936
number of failed transactions: 0 (0.000%)
number of transactions above the 10.0 ms latency limit: 230810/567936 (40.640%)
latency average = 15.821 ms
latency stddev = 69.610 ms
initial connection time = 249.668 ms
tps = 3158.149150 (without initial connection time)
statement latencies in milliseconds and failures:
0.002 0 \set aid random(1, 100000 * :scale)
0.001 0 \set bid random(1, 1 * :scale)
0.001 0 \set tid random(1, 10 * :scale)
0.001 0 \set delta random(-5000, 5000)
1.092 0 BEGIN;
2.794 0 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;
1.472 0 SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
2.040 0 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;
4.062 0 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;
1.225 0 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);
3.117 0 END;
------------------------------------------
PPCle with asm code
Pple - with asm
[pgdev@roxxpg3 install]$ pgbench -c 50 -p 5678 -d postgres -T 180 -r -P 10 -L 10 -j 20
pgbench (18devel)
starting vacuum...end.
progress: 10.0 s, 4932.9 tps, lat 10.110 ms stddev 7.215, 0 failed
progress: 20.0 s, 5041.2 tps, lat 9.916 ms stddev 6.794, 0 failed
progress: 30.0 s, 5135.3 tps, lat 9.737 ms stddev 6.572, 0 failed
progress: 40.0 s, 5085.2 tps, lat 9.830 ms stddev 6.556, 0 failed
progress: 50.0 s, 5199.0 tps, lat 9.616 ms stddev 6.579, 0 failed
progress: 60.0 s, 5173.5 tps, lat 9.663 ms stddev 6.536, 0 failed
progress: 70.0 s, 5184.9 tps, lat 9.643 ms stddev 6.796, 0 failed
progress: 80.0 s, 5205.1 tps, lat 9.605 ms stddev 6.639, 0 failed
progress: 90.0 s, 5209.5 tps, lat 9.598 ms stddev 6.636, 0 failed
progress: 100.0 s, 5141.9 tps, lat 9.723 ms stddev 6.631, 0 failed
progress: 110.0 s, 5204.0 tps, lat 9.607 ms stddev 6.494, 0 failed
progress: 120.0 s, 5187.3 tps, lat 9.638 ms stddev 6.683, 0 failed
progress: 130.0 s, 5046.7 tps, lat 9.904 ms stddev 6.820, 0 failed
progress: 140.0 s, 4643.9 tps, lat 10.768 ms stddev 7.380, 0 failed
progress: 150.0 s, 5080.3 tps, lat 9.840 ms stddev 6.681, 0 failed
progress: 160.0 s, 5152.3 tps, lat 9.705 ms stddev 6.669, 0 failed
progress: 170.0 s, 5106.7 tps, lat 9.790 ms stddev 6.518, 0 failed
progress: 180.0 s, 5130.0 tps, lat 9.743 ms stddev 6.651, 0 failed
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 50
query mode: simple
number of clients: 50
number of threads: 20
maximum number of tries: 1
duration: 180 s
number of transactions actually processed: 918647
number of failed transactions: 0 (0.000%)
number of transactions above the 10.0 ms latency limit: 356945/918647 (38.856%)
latency average = 9.796 ms
latency stddev = 6.718 ms
initial connection time = 19.606 ms
tps = 5103.024267 (without initial connection time)
statement latencies in milliseconds and failures:
0.001 0 \set aid random(1, 100000 * :scale)
0.001 0 \set bid random(1, 1 * :scale)
0.001 0 \set tid random(1, 10 * :scale)
0.001 0 \set delta random(-5000, 5000)
0.578 0 BEGIN;
1.764 0 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;
0.595 0 SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
0.922 0 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;
2.504 0 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;
0.499 0 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);
2.956 0 END;
------------------------------------------
PPCle with __sync_lock_test_and_set
PPCle - with __sync
[pgdev@roxxpg3 install]$ pgbench -c 50 -p 5678 -d postgres -T 180 -r -P 10 -L 10 -j 20
pgbench (18devel)
starting vacuum...end.
progress: 10.0 s, 4817.2 tps, lat 10.353 ms stddev 7.367, 0 failed
progress: 20.0 s, 4737.2 tps, lat 10.552 ms stddev 7.232, 0 failed
progress: 30.0 s, 4774.7 tps, lat 10.470 ms stddev 7.186, 0 failed
progress: 40.0 s, 4892.3 tps, lat 10.219 ms stddev 7.072, 0 failed
progress: 50.0 s, 4811.5 tps, lat 10.391 ms stddev 7.123, 0 failed
progress: 60.0 s, 4883.1 tps, lat 10.242 ms stddev 6.962, 0 failed
progress: 70.0 s, 4867.8 tps, lat 10.269 ms stddev 7.049, 0 failed
progress: 80.0 s, 4886.6 tps, lat 10.228 ms stddev 7.037, 0 failed
progress: 90.0 s, 4765.9 tps, lat 10.494 ms stddev 7.149, 0 failed
progress: 100.0 s, 4902.0 tps, lat 10.198 ms stddev 7.030, 0 failed
progress: 110.0 s, 4815.3 tps, lat 10.381 ms stddev 7.208, 0 failed
progress: 120.0 s, 4807.1 tps, lat 10.400 ms stddev 7.059, 0 failed
progress: 130.0 s, 4932.0 tps, lat 10.137 ms stddev 6.973, 0 failed
progress: 140.0 s, 4880.6 tps, lat 10.244 ms stddev 7.009, 0 failed
progress: 150.0 s, 4613.2 tps, lat 10.837 ms stddev 7.594, 0 failed
progress: 160.0 s, 4335.8 tps, lat 11.533 ms stddev 7.776, 0 failed
progress: 170.0 s, 4904.0 tps, lat 10.194 ms stddev 6.935, 0 failed
progress: 180.0 s, 4762.6 tps, lat 10.501 ms stddev 7.194, 0 failed
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 50
query mode: simple
number of clients: 50
number of threads: 20
maximum number of tries: 1
duration: 180 s
number of transactions actually processed: 863937
number of failed transactions: 0 (0.000%)
number of transactions above the 10.0 ms latency limit: 364346/863937 (42.173%)
latency average = 10.416 ms
latency stddev = 7.168 ms
initial connection time = 20.090 ms
tps = 4799.621896 (without initial connection time)
statement latencies in milliseconds and failures:
0.001 0 \set aid random(1, 100000 * :scale)
0.001 0 \set bid random(1, 1 * :scale)
0.001 0 \set tid random(1, 10 * :scale)
0.001 0 \set delta random(-5000, 5000)
0.628 0 BEGIN;
1.793 0 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;
0.627 0 SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
0.977 0 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;
2.694 0 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;
0.525 0 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);
3.194 0 END;
------------------------------------------
Attachments:
[application/octet-stream] 0001-AIX-support.tas.memset.diffs (3.2K, 3-0001-AIX-support.tas.memset.diffs)
download
[text/plain] spinlock.stats.log (11.0K, 4-spinlock.stats.log)
download | inline:
------------------------------------------
AIX with asm spin lock
>> pgbench -c 50 -p 5678 -d postgres -T 180 -r -P 10 -L 10 -j 20
pgbench (18devel)
starting vacuum...end.
progress: 10.0 s, 3181.5 tps, lat 15.331 ms stddev 17.867, 0 failed
progress: 20.0 s, 3277.2 tps, lat 14.730 ms stddev 18.792, 0 failed
progress: 30.0 s, 2642.9 tps, lat 19.556 ms stddev 106.940, 0 failed
progress: 40.0 s, 3614.3 tps, lat 13.830 ms stddev 14.673, 0 failed
progress: 50.0 s, 2355.4 tps, lat 21.208 ms stddev 132.907, 0 failed
progress: 60.0 s, 3046.8 tps, lat 16.407 ms stddev 53.507, 0 failed
progress: 70.0 s, 3640.1 tps, lat 13.734 ms stddev 14.549, 0 failed
progress: 80.0 s, 2435.2 tps, lat 20.518 ms stddev 125.603, 0 failed
progress: 90.0 s, 3576.3 tps, lat 13.977 ms stddev 14.341, 0 failed
progress: 100.0 s, 3653.9 tps, lat 13.681 ms stddev 14.554, 0 failed
progress: 110.0 s, 2414.6 tps, lat 20.684 ms stddev 134.585, 0 failed
progress: 120.0 s, 3051.6 tps, lat 16.383 ms stddev 63.253, 0 failed
progress: 130.0 s, 3657.2 tps, lat 13.667 ms stddev 14.375, 0 failed
progress: 140.0 s, 3159.0 tps, lat 14.259 ms stddev 18.915, 0 failed
progress: 150.0 s, 2889.8 tps, lat 19.006 ms stddev 121.852, 0 failed
progress: 160.0 s, 3649.0 tps, lat 13.693 ms stddev 14.288, 0 failed
progress: 170.0 s, 2799.8 tps, lat 14.552 ms stddev 17.307, 0 failed
progress: 180.0 s, 2582.9 tps, lat 22.914 ms stddev 121.785, 0 failed
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 50
query mode: simple
number of clients: 50
number of threads: 20
maximum number of tries: 1
duration: 180 s
number of transactions actually processed: 556329
number of failed transactions: 0 (0.000%)
number of transactions above the 10.0 ms latency limit: 226554/556329 (40.723%)
latency average = 16.160 ms
latency stddev = 69.085 ms
initial connection time = 230.786 ms
tps = 3086.209412 (without initial connection time)
statement latencies in milliseconds and failures:
0.002 0 \set aid random(1, 100000 * :scale)
0.001 0 \set bid random(1, 1 * :scale)
0.001 0 \set tid random(1, 10 * :scale)
0.001 0 \set delta random(-5000, 5000)
1.084 0 BEGIN;
2.997 0 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;
1.400 0 SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
2.014 0 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;
4.094 0 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;
1.217 0 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);
3.346 0 END;
------------------------------------------
AIX with __sync_lock_test_and_set
pgdev@roxxpg2:~/pgdb/postgres/install]
>> pgbench -c 50 -p 5678 -d postgres -T 180 -r -P 10 -L 10 -j 20
pgbench (18devel)
starting vacuum...end.
progress: 10.0 s, 3391.8 tps, lat 14.339 ms stddev 13.922, 0 failed
progress: 20.0 s, 2724.0 tps, lat 18.350 ms stddev 96.241, 0 failed
progress: 30.0 s, 3571.4 tps, lat 14.001 ms stddev 14.957, 0 failed
progress: 40.0 s, 2630.9 tps, lat 18.993 ms stddev 115.583, 0 failed
progress: 50.0 s, 3574.5 tps, lat 13.984 ms stddev 14.838, 0 failed
progress: 60.0 s, 3577.0 tps, lat 13.973 ms stddev 15.055, 0 failed
progress: 70.0 s, 2401.7 tps, lat 20.810 ms stddev 149.104, 0 failed
progress: 80.0 s, 2891.0 tps, lat 17.291 ms stddev 73.637, 0 failed
progress: 90.0 s, 3529.0 tps, lat 14.160 ms stddev 15.212, 0 failed
progress: 100.0 s, 2637.2 tps, lat 18.951 ms stddev 111.379, 0 failed
progress: 110.0 s, 3593.1 tps, lat 13.903 ms stddev 14.604, 0 failed
progress: 120.0 s, 3560.3 tps, lat 14.048 ms stddev 14.926, 0 failed
progress: 130.0 s, 3230.5 tps, lat 13.796 ms stddev 15.330, 0 failed
progress: 140.0 s, 2293.2 tps, lat 24.154 ms stddev 163.908, 0 failed
progress: 150.0 s, 3511.8 tps, lat 14.219 ms stddev 15.367, 0 failed
progress: 160.0 s, 3612.9 tps, lat 13.836 ms stddev 14.839, 0 failed
progress: 170.0 s, 2523.9 tps, lat 19.811 ms stddev 129.520, 0 failed
progress: 180.0 s, 3533.7 tps, lat 14.136 ms stddev 14.988, 0 failed
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 50
query mode: simple
number of clients: 50
number of threads: 20
maximum number of tries: 1
duration: 180 s
number of transactions actually processed: 567936
number of failed transactions: 0 (0.000%)
number of transactions above the 10.0 ms latency limit: 230810/567936 (40.640%)
latency average = 15.821 ms
latency stddev = 69.610 ms
initial connection time = 249.668 ms
tps = 3158.149150 (without initial connection time)
statement latencies in milliseconds and failures:
0.002 0 \set aid random(1, 100000 * :scale)
0.001 0 \set bid random(1, 1 * :scale)
0.001 0 \set tid random(1, 10 * :scale)
0.001 0 \set delta random(-5000, 5000)
1.092 0 BEGIN;
2.794 0 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;
1.472 0 SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
2.040 0 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;
4.062 0 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;
1.225 0 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);
3.117 0 END;
------------------------------------------
PPCle with asm code
Pple - with asm
[pgdev@roxxpg3 install]$ pgbench -c 50 -p 5678 -d postgres -T 180 -r -P 10 -L 10 -j 20
pgbench (18devel)
starting vacuum...end.
progress: 10.0 s, 4932.9 tps, lat 10.110 ms stddev 7.215, 0 failed
progress: 20.0 s, 5041.2 tps, lat 9.916 ms stddev 6.794, 0 failed
progress: 30.0 s, 5135.3 tps, lat 9.737 ms stddev 6.572, 0 failed
progress: 40.0 s, 5085.2 tps, lat 9.830 ms stddev 6.556, 0 failed
progress: 50.0 s, 5199.0 tps, lat 9.616 ms stddev 6.579, 0 failed
progress: 60.0 s, 5173.5 tps, lat 9.663 ms stddev 6.536, 0 failed
progress: 70.0 s, 5184.9 tps, lat 9.643 ms stddev 6.796, 0 failed
progress: 80.0 s, 5205.1 tps, lat 9.605 ms stddev 6.639, 0 failed
progress: 90.0 s, 5209.5 tps, lat 9.598 ms stddev 6.636, 0 failed
progress: 100.0 s, 5141.9 tps, lat 9.723 ms stddev 6.631, 0 failed
progress: 110.0 s, 5204.0 tps, lat 9.607 ms stddev 6.494, 0 failed
progress: 120.0 s, 5187.3 tps, lat 9.638 ms stddev 6.683, 0 failed
progress: 130.0 s, 5046.7 tps, lat 9.904 ms stddev 6.820, 0 failed
progress: 140.0 s, 4643.9 tps, lat 10.768 ms stddev 7.380, 0 failed
progress: 150.0 s, 5080.3 tps, lat 9.840 ms stddev 6.681, 0 failed
progress: 160.0 s, 5152.3 tps, lat 9.705 ms stddev 6.669, 0 failed
progress: 170.0 s, 5106.7 tps, lat 9.790 ms stddev 6.518, 0 failed
progress: 180.0 s, 5130.0 tps, lat 9.743 ms stddev 6.651, 0 failed
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 50
query mode: simple
number of clients: 50
number of threads: 20
maximum number of tries: 1
duration: 180 s
number of transactions actually processed: 918647
number of failed transactions: 0 (0.000%)
number of transactions above the 10.0 ms latency limit: 356945/918647 (38.856%)
latency average = 9.796 ms
latency stddev = 6.718 ms
initial connection time = 19.606 ms
tps = 5103.024267 (without initial connection time)
statement latencies in milliseconds and failures:
0.001 0 \set aid random(1, 100000 * :scale)
0.001 0 \set bid random(1, 1 * :scale)
0.001 0 \set tid random(1, 10 * :scale)
0.001 0 \set delta random(-5000, 5000)
0.578 0 BEGIN;
1.764 0 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;
0.595 0 SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
0.922 0 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;
2.504 0 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;
0.499 0 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);
2.956 0 END;
------------------------------------------
PPCle with __sync_lock_test_and_set
PPCle - with __sync
[pgdev@roxxpg3 install]$ pgbench -c 50 -p 5678 -d postgres -T 180 -r -P 10 -L 10 -j 20
pgbench (18devel)
starting vacuum...end.
progress: 10.0 s, 4817.2 tps, lat 10.353 ms stddev 7.367, 0 failed
progress: 20.0 s, 4737.2 tps, lat 10.552 ms stddev 7.232, 0 failed
progress: 30.0 s, 4774.7 tps, lat 10.470 ms stddev 7.186, 0 failed
progress: 40.0 s, 4892.3 tps, lat 10.219 ms stddev 7.072, 0 failed
progress: 50.0 s, 4811.5 tps, lat 10.391 ms stddev 7.123, 0 failed
progress: 60.0 s, 4883.1 tps, lat 10.242 ms stddev 6.962, 0 failed
progress: 70.0 s, 4867.8 tps, lat 10.269 ms stddev 7.049, 0 failed
progress: 80.0 s, 4886.6 tps, lat 10.228 ms stddev 7.037, 0 failed
progress: 90.0 s, 4765.9 tps, lat 10.494 ms stddev 7.149, 0 failed
progress: 100.0 s, 4902.0 tps, lat 10.198 ms stddev 7.030, 0 failed
progress: 110.0 s, 4815.3 tps, lat 10.381 ms stddev 7.208, 0 failed
progress: 120.0 s, 4807.1 tps, lat 10.400 ms stddev 7.059, 0 failed
progress: 130.0 s, 4932.0 tps, lat 10.137 ms stddev 6.973, 0 failed
progress: 140.0 s, 4880.6 tps, lat 10.244 ms stddev 7.009, 0 failed
progress: 150.0 s, 4613.2 tps, lat 10.837 ms stddev 7.594, 0 failed
progress: 160.0 s, 4335.8 tps, lat 11.533 ms stddev 7.776, 0 failed
progress: 170.0 s, 4904.0 tps, lat 10.194 ms stddev 6.935, 0 failed
progress: 180.0 s, 4762.6 tps, lat 10.501 ms stddev 7.194, 0 failed
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 50
query mode: simple
number of clients: 50
number of threads: 20
maximum number of tries: 1
duration: 180 s
number of transactions actually processed: 863937
number of failed transactions: 0 (0.000%)
number of transactions above the 10.0 ms latency limit: 364346/863937 (42.173%)
latency average = 10.416 ms
latency stddev = 7.168 ms
initial connection time = 20.090 ms
tps = 4799.621896 (without initial connection time)
statement latencies in milliseconds and failures:
0.001 0 \set aid random(1, 100000 * :scale)
0.001 0 \set bid random(1, 1 * :scale)
0.001 0 \set tid random(1, 10 * :scale)
0.001 0 \set delta random(-5000, 5000)
0.628 0 BEGIN;
1.793 0 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;
0.627 0 SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
0.977 0 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;
2.694 0 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;
0.525 0 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);
3.194 0 END;
------------------------------------------
[application/octet-stream] 0001-AIX-support.v8.patch (14.1K, 5-0001-AIX-support.v8.patch)
download | inline diff:
From c854025252ca3dfff9f7f1c4d4aed21cf0cf5346 Mon Sep 17 00:00:00 2001
From: Sriram RK <[email protected]>
Date: Fri, 4 Apr 2025 13:16:21 -0500
Subject: [PATCH] AIX support.
---
Makefile | 2 -
configure | 34 ++++++++++++++---
configure.ac | 34 ++++++++++++++---
src/Makefile.shlib | 29 ++++++++++++++
src/backend/Makefile | 20 ++++++++++
src/backend/port/aix/mkldexport.sh | 61 ++++++++++++++++++++++++++++++
src/backend/utils/error/elog.c | 2 +
src/include/port/aix.h | 4 ++
src/include/storage/s_lock.h | 10 ++---
src/makefiles/Makefile.aix | 29 ++++++++++++++
src/port/strerror.c | 2 +
src/template/aix | 7 ++++
12 files changed, 214 insertions(+), 20 deletions(-)
create mode 100755 src/backend/port/aix/mkldexport.sh
create mode 100644 src/include/port/aix.h
create mode 100644 src/makefiles/Makefile.aix
create mode 100644 src/template/aix
diff --git a/Makefile b/Makefile
index 8a2ec9396b6..9bc1a4ec17b 100644
--- a/Makefile
+++ b/Makefile
@@ -13,8 +13,6 @@
# AIX make defaults to building *every* target of the first rule. Start with
# a single-target, empty rule to make the other targets non-default.
-# (We don't support AIX anymore, but if someone tries to build on AIX anyway,
-# at least they'll get the instructions to run 'configure' first.)
all:
all check install installdirs installcheck installcheck-parallel uninstall clean distclean maintainer-clean dist distcheck world check-world install-world installcheck-world:
diff --git a/configure b/configure
index 11615d1122d..6088fa26679 100755
--- a/configure
+++ b/configure
@@ -3008,6 +3008,7 @@ else
# --with-template not given
case $host_os in
+ aix*) template=aix ;;
cygwin*|msys*) template=cygwin ;;
darwin*) template=darwin ;;
dragonfly*) template=netbsd ;;
@@ -16953,13 +16954,34 @@ _ACEOF
# wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too
# much of a penalty for disk and memory space.
-MAX_ALIGNOF=$ac_cv_alignof_double
+if test "$PORTNAME" != "aix"; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
+
+ if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
+ as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
+ fi
+ if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF ; then
+ as_fn_error $? "alignment of 'long long int' is greater than the alignment of 'double'" "$LINENO" 5
+ fi
+else
+# The AIX 'power' alignment rules apply the natural alignment of the "first
+# member" if it is of a floating-point data type (or is an aggregate whose
+# recursively "first" member or element is such a type). The alignment
+# associated with these types for subsequent members use an alignment value
+# where the floating-point data type is considered to have 4-byte alignment.
+# More info
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99557
+#
+# The double is aligned to 4-bytes on AIX in aggregates. But to maintain
+# alignement across platforms the max alignment of long should be considered.
+ MAX_ALIGNOF=$ac_cv_alignof_long
+ if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
+ fi
+ if test $MAX_ALIGNOF -lt $ac_cv_alignof_int64_t; then
+ MAX_ALIGNOF="$ac_cv_alignof_int64_t"
+ fi
-if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
- as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
-fi
-if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF ; then
- as_fn_error $? "alignment of 'int64_t' is greater than the alignment of 'double'" "$LINENO" 5
fi
cat >>confdefs.h <<_ACEOF
diff --git a/configure.ac b/configure.ac
index debdf165044..c21aaa52064 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,6 +62,7 @@ PGAC_ARG_REQ(with, template, [NAME], [override operating system template],
# --with-template not given
case $host_os in
+ aix*) template=aix ;;
cygwin*|msys*) template=cygwin ;;
darwin*) template=darwin ;;
dragonfly*) template=netbsd ;;
@@ -1987,13 +1988,34 @@ AC_CHECK_ALIGNOF(double)
# wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too
# much of a penalty for disk and memory space.
-MAX_ALIGNOF=$ac_cv_alignof_double
+if test "$PORTNAME" != "aix"; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
+
+ if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
+ as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
+ fi
+ if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF; then
+ as_fn_error $? "alignment of 'long long int' is greater than the alignment of 'double'" "$LINENO" 5
+ fi
+else
+# The AIX 'power' alignment rules apply the natural alignment of the "first
+# member" if it is of a floating-point data type (or is an aggregate whose
+# recursively "first" member or element is such a type). The alignment
+# associated with these types for subsequent members use an alignment value
+# where the floating-point data type is considered to have 4-byte alignment.
+# More info
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99557
+#
+# The double is aligned to 4-bytes on AIX in aggregates. But to maintain
+# alignement across platforms the max alignment of long should be considered.
+ MAX_ALIGNOF=$ac_cv_alignof_long
+ if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
+ fi
+ if test $MAX_ALIGNOF -lt $ac_cv_alignof_int64_t ; then
+ MAX_ALIGNOF="$ac_cv_alignof_int64_t"
+ fi
-if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
- AC_MSG_ERROR([alignment of 'long' is greater than the alignment of 'double'])
-fi
-if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF ; then
- AC_MSG_ERROR([alignment of 'int64_t' is greater than the alignment of 'double'])
fi
AC_DEFINE_UNQUOTED(MAXIMUM_ALIGNOF, $MAX_ALIGNOF, [Define as the maximum alignment requirement of any C data type.])
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index fa81f6ffdd6..13ea84ac185 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -106,6 +106,20 @@ ifdef SO_MAJOR_VERSION
override CPPFLAGS += -DSO_MAJOR_VERSION=$(SO_MAJOR_VERSION)
endif
+ifeq ($(PORTNAME), aix)
+ LINK.shared = $(COMPILER)
+ ifdef SO_MAJOR_VERSION
+ shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
+ endif
+ haslibarule = yes
+ # $(exports_file) is also usable as an import file
+ exports_file = lib$(NAME).exp
+ BUILD.exports = ( echo '\#! $(shlib)'; $(AWK) '/^[^\#]/ {printf "%s\n",$$1}' $< ) > $@
+ ifneq (,$(SHLIB_EXPORTS))
+ LINK.shared += -Wl,-bE:$(exports_file)
+ endif
+endif
+
ifeq ($(PORTNAME), darwin)
ifdef soname
# linkable library
@@ -254,6 +268,14 @@ $(stlib): $(OBJS) | $(SHLIB_PREREQS)
touch $@
endif #haslibarule
+# AIX wraps both shared libraries and static library, which can be used both
+# for static and shared linking
+ifeq ($(PORTNAME), aix)
+$(stlib): $(shlib)
+ rm -f $(stlib)
+ $(AR) $(AROPT) $(stlib) $(shlib)
+endif # aix
+
ifeq (,$(filter cygwin win32,$(PORTNAME)))
# Normal case
@@ -267,8 +289,11 @@ ifneq ($(shlib), $(shlib_major))
endif
# Make sure we have a link to a name without any version numbers
ifneq ($(shlib), $(shlib_bare))
+# except on AIX, where that's not a thing
+ifneq ($(PORTNAME), aix)
rm -f $(shlib_bare)
$(LN_S) $(shlib) $(shlib_bare)
+endif # aix
endif # shlib_bare
endif # shlib_major
@@ -376,6 +401,9 @@ install-lib-static: $(stlib) installdirs-lib
install-lib-shared: $(shlib) installdirs-lib
ifdef soname
+# we don't install $(shlib) on AIX
+# (see http://archives.postgresql.org/message-id/52EF20B2E3209443BC37736D00C3C1380A6E79FE@EXADV1.host.magwien.gv.at)
+ifneq ($(PORTNAME), aix)
$(INSTALL_SHLIB) $< '$(DESTDIR)$(libdir)/$(shlib)'
ifneq ($(PORTNAME), cygwin)
ifneq ($(PORTNAME), win32)
@@ -391,6 +419,7 @@ ifneq ($(shlib), $(shlib_bare))
endif
endif # not win32
endif # not cygwin
+endif # not aix
ifneq (,$(findstring $(PORTNAME),win32 cygwin))
$(INSTALL_SHLIB) $< '$(DESTDIR)$(bindir)/$(shlib)'
endif
diff --git a/src/backend/Makefile b/src/backend/Makefile
index 7344c8c7f5c..572f5430a60 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -63,12 +63,14 @@ all: submake-libpgport submake-catalog-headers submake-utils-headers postgres $(
ifneq ($(PORTNAME), cygwin)
ifneq ($(PORTNAME), win32)
+ifneq ($(PORTNAME), aix)
postgres: $(OBJS)
$(CC) $(CFLAGS) $(call expand_subsys,$^) $(LDFLAGS) $(LIBS) -o $@
endif
endif
+endif
ifeq ($(PORTNAME), cygwin)
@@ -95,6 +97,24 @@ libpostgres.a: postgres
endif # win32
+ifeq ($(PORTNAME), aix)
+
+postgres: $(POSTGRES_IMP)
+ $(CC) $(CFLAGS) $(call expand_subsys,$(OBJS)) $(LDFLAGS) -Wl,-bE:$(top_builddir)/src/backend/$(POSTGRES_IMP) $(LIBS) -Wl,-brtllib -o $@
+
+# Linking to a single .o with -r is a lot faster than building a .a or passing
+# all objects to MKLDEXPORT.
+#
+# It looks alluring to use $(CC) -r instead of ld -r, but that doesn't
+# trivially work with gcc, due to gcc specific static libraries linked in with
+# -r.
+$(POSTGRES_IMP): $(OBJS)
+ ld -r -o SUBSYS.o $(call expand_subsys,$^)
+ $(MKLDEXPORT) SUBSYS.o . > $@
+ @rm -f SUBSYS.o
+
+endif # aix
+
$(top_builddir)/src/port/libpgport_srv.a: | submake-libpgport
diff --git a/src/backend/port/aix/mkldexport.sh b/src/backend/port/aix/mkldexport.sh
new file mode 100755
index 00000000000..adf3793e868
--- /dev/null
+++ b/src/backend/port/aix/mkldexport.sh
@@ -0,0 +1,61 @@
+#!/bin/sh
+#
+# mkldexport
+# create an AIX exports file from an object file
+#
+# src/backend/port/aix/mkldexport.sh
+#
+# Usage:
+# mkldexport objectfile [location]
+# where
+# objectfile is the current location of the object file.
+# location is the eventual (installed) location of the
+# object file (if different from the current
+# working directory).
+#
+# [This file comes from the Postgres 4.2 distribution. - ay 7/95]
+#
+# Header: /usr/local/devel/postgres/src/tools/mkldexport/RCS/mkldexport.sh,v 1.2 1994/03/13 04:59:12 aoki Exp
+#
+
+# setting this to nm -B might be better
+# ... due to changes in AIX 4.x ...
+# ... let us search in different directories - Gerhard Reithofer
+if [ -x /usr/ucb/nm ]
+then NM=/usr/ucb/nm
+elif [ -x /usr/bin/nm ]
+then NM=/usr/bin/nm
+elif [ -x /usr/ccs/bin/nm ]
+then NM=/usr/ccs/bin/nm
+elif [ -x /usr/usg/bin/nm ]
+then NM=/usr/usg/bin/nm
+else echo "Fatal error: cannot find `nm' ... please check your installation."
+ exit 1
+fi
+
+CMDNAME=`basename $0`
+if [ -z "$1" ]; then
+ echo "Usage: $CMDNAME object [location]"
+ exit 1
+fi
+OBJNAME=`basename $1`
+if [ "`basename $OBJNAME`" != "`basename $OBJNAME .o`" ]; then
+ OBJNAME=`basename $OBJNAME .o`.so
+fi
+if [ -z "$2" ]; then
+ echo '#!'
+else
+ if [ "$2" = "." ]; then
+ # for the base executable (AIX 4.2 and up)
+ echo '#! .'
+ else
+ echo '#!' $2
+ fi
+fi
+$NM -BCg $1 | \
+ egrep ' [TDB] ' | \
+ sed -e 's/.* //' | \
+ egrep -v '\$' | \
+ sed -e 's/^[.]//' | \
+ sort | \
+ uniq
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index 8a6b6905079..3a8e9dc30b0 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -904,7 +904,9 @@ errcode_for_file_access(void)
/* Wrong object type or state */
case ENOTDIR: /* Not a directory */
case EISDIR: /* Is a directory */
+#if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */
case ENOTEMPTY: /* Directory not empty */
+#endif
edata->sqlerrcode = ERRCODE_WRONG_OBJECT_TYPE;
break;
diff --git a/src/include/port/aix.h b/src/include/port/aix.h
new file mode 100644
index 00000000000..7d08480c8c0
--- /dev/null
+++ b/src/include/port/aix.h
@@ -0,0 +1,4 @@
+/*
+ * src/include/port/aix.h
+ */
+
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index 2f73f9fcf57..5da9b3acda4 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -421,17 +421,15 @@ tas(volatile slock_t *lock)
__asm__ __volatile__(
" lwarx %0,0,%3,1 \n"
" cmpwi %0,0 \n"
-" bne 1f \n"
+" bne $+16 \n" /* branch to li %1,1 */
" addi %0,%0,1 \n"
" stwcx. %0,0,%3 \n"
-" beq 2f \n"
-"1: \n"
+" beq $+12 \n" /* branch to lwsync */
" li %1,1 \n"
-" b 3f \n"
-"2: \n"
+" b $+12 \n" /* branch to end of asm sequence */
" lwsync \n"
" li %1,0 \n"
-"3: \n"
+
: "=&b"(_t), "=r"(_res), "+m"(*lock)
: "r"(lock)
: "memory", "cc");
diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix
new file mode 100644
index 00000000000..ab6581533d8
--- /dev/null
+++ b/src/makefiles/Makefile.aix
@@ -0,0 +1,29 @@
+# -blibpath must contain ALL directories where we should look for libraries
+libpath := $(shell echo $(subst -L,:,$(filter -L/%,$(LDFLAGS))) | sed -e's/ //g'):/usr/lib:/lib
+
+# AIX uses a stricter, more explicit approach. The runtime linker expects
+# to tell it exactly where to look using -blibpath.
+rpath = -Wl,-blibpath:'$(rpathdir)$(libpath)'
+
+# gcc needs to know it's building a shared lib, otherwise it'll not emit
+# correct code / link to the right support libraries
+ifeq ($(GCC), yes)
+LDFLAGS_SL += -shared
+endif
+
+# env var name to use in place of LD_LIBRARY_PATH
+ld_library_path_var = LIBPATH
+
+POSTGRES_IMP= postgres.imp
+
+ifdef PGXS
+BE_DLLLIBS= -Wl,-bI:$(pkglibdir)/$(POSTGRES_IMP)
+else
+BE_DLLLIBS= -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP)
+endif
+
+MKLDEXPORT_DIR=src/backend/port/aix
+MKLDEXPORT=$(top_srcdir)/$(MKLDEXPORT_DIR)/mkldexport.sh
+
+%$(DLSUFFIX): %.o
+ $(CC) $(CFLAGS) $*.o $(LDFLAGS) $(LDFLAGS_SL) -o $@ $(BE_DLLLIBS)
diff --git a/src/port/strerror.c b/src/port/strerror.c
index f0746517770..c46b9dc91fc 100644
--- a/src/port/strerror.c
+++ b/src/port/strerror.c
@@ -214,8 +214,10 @@ get_errno_symbol(int errnum)
return "ENOTCONN";
case ENOTDIR:
return "ENOTDIR";
+#if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */
case ENOTEMPTY:
return "ENOTEMPTY";
+#endif
case ENOTSOCK:
return "ENOTSOCK";
#ifdef ENOTSUP
diff --git a/src/template/aix b/src/template/aix
new file mode 100644
index 00000000000..48a3ce55cf7
--- /dev/null
+++ b/src/template/aix
@@ -0,0 +1,7 @@
+# src/template/aix
+
+# Extra CFLAGS for code that will go into a shared library
+CFLAGS_SL=""
+
+# Native memset() is faster.
+MEMSET_LOOP_LIMIT=0
--
2.41.0
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-04-25 01:31 Thomas Munro <[email protected]>
parent: Heikki Linnakangas <[email protected]>
1 sibling, 0 replies; 29+ messages in thread
From: Thomas Munro @ 2025-04-25 01:31 UTC (permalink / raw)
To: Heikki Linnakangas <[email protected]>; +Cc: Srirama Kucherlapati <[email protected]>; pgsql-hackers; Robert Haas <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>; wenhui qiu <[email protected]>; [email protected] <[email protected]>
On Mon, Apr 7, 2025 at 10:04 PM Heikki Linnakangas <[email protected]> wrote:
> I'm surprised how big the difference is, because I actually expected the
> compiler to detect the memory-zeroing loop and replace it with some
> fancy vector instructions (does powerpc have any?).
It certainly does, and we've played with explicit AltiVec
vectorisation before with the idea that our abstraction over x86 and
ARM instructions could be extended to POWER, but that was just trying
stuff and learning while wondering if those abstractions are general
enough and how well all the instructions match up. No one with modern
hardware and a vested interest has seriously investigated it. That's
independent of automatic vectorisation done by the compiler or libc,
and I guess it would not really be AIX-specific since it would also
apply to Linux on POWER. One of those patches is linked from this
small list of "ideas for a future PostgreSQL/AIX maintainer":
https://wiki.postgresql.org/wiki/AIX
^ permalink raw reply [nested|flat] 29+ messages in thread
* RE: AIX support
@ 2025-09-03 16:44 Srirama Kucherlapati <[email protected]>
parent: Srirama Kucherlapati <[email protected]>
0 siblings, 2 replies; 29+ messages in thread
From: Srirama Kucherlapati @ 2025-09-03 16:44 UTC (permalink / raw)
To: Heikki Linnakangas <[email protected]>; pgsql-hackers; +Cc: Robert Haas <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>; wenhui qiu <[email protected]>; [email protected] <[email protected]>
Hi Heikki and team,
As part of our ongoing efforts to enhance AIX platform compatibility, we’ve been running the code across all stable PostgreSQL release branches using the build farm infrastructure. All test suites, including TAP tests, are passing consistently, indicating no regressions.
https://buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=douc&br=REL_13_STABLE
https://buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=douc&br=REL_14_STABLE
https://buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=douc&br=REL_15_STABLE
https://buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=douc&br=REL_16_STABLE << Also tested locally.
To further validated the patch, we executed the build farm scripts locally for PostgreSQL 17 and 18 on AIX. The corresponding test results are attached for reference.
We value your feedback and would appreciate your insights on the attached patch. Kindly request you to review and share your comments.
Warm regards,
Sriram.
Sun Aug 10 22:34:32 2025: buildfarm run for urus:REL_16_STABLE starting
urus:REL_16_STABLE [22:34:43] checking out source ...
running git clone -q /home/pgdev/bfarm/build-farm-19.1.16/buildroot/pgmirror.git "/home/pgdev/bfarm/build-farm-19.1.16/buildroot/HEAD/pgsql"
urus:REL_16_STABLE [22:41:18] checking if build run needed ...
urus:REL_16_STABLE [22:41:18] copying source to pgsql.build ...
urus:REL_16_STABLE [22:41:27] running configure ...
urus:REL_16_STABLE [22:42:11] running build ...
urus:REL_16_STABLE [22:53:07] running basic regression tests ...
urus:REL_16_STABLE [22:54:23] running make contrib ...
urus:REL_16_STABLE [22:55:29] running make testmodules ...
urus:REL_16_STABLE [22:55:39] running install ...
urus:REL_16_STABLE [22:56:09] running make contrib install ...
urus:REL_16_STABLE [22:56:19] running testmodules install ...
urus:REL_16_STABLE [22:56:24] running make check miscellaneous modules ...
urus:REL_16_STABLE [22:57:41] running bin test initdb ...
urus:REL_16_STABLE [22:57:52] running bin test pg_amcheck ...
urus:REL_16_STABLE [22:58:11] running bin test pg_archivecleanup ...
urus:REL_16_STABLE [22:58:12] running bin test pg_basebackup ...
urus:REL_16_STABLE [22:59:02] running bin test pg_checksums ...
urus:REL_16_STABLE [22:59:09] running bin test pg_config ...
urus:REL_16_STABLE [22:59:09] running bin test pg_controldata ...
urus:REL_16_STABLE [22:59:12] running bin test pg_ctl ...
urus:REL_16_STABLE [22:59:31] running bin test pg_dump ...
urus:REL_16_STABLE [23:00:10] running bin test pg_resetwal ...
urus:REL_16_STABLE [23:00:15] running bin test pg_rewind ...
urus:REL_16_STABLE [23:01:49] running bin test pg_test_fsync ...
urus:REL_16_STABLE [23:01:50] running bin test pg_test_timing ...
urus:REL_16_STABLE [23:01:50] running bin test pg_upgrade ...
urus:REL_16_STABLE [23:02:55] running bin test pg_verifybackup ...
urus:REL_16_STABLE [23:03:57] running bin test pg_waldump ...
urus:REL_16_STABLE [23:04:01] running bin test pgbench ...
urus:REL_16_STABLE [23:04:13] running bin test psql ...
urus:REL_16_STABLE [23:04:20] running bin test scripts ...
urus:REL_16_STABLE [23:05:10] running test misc-recovery ...
urus:REL_16_STABLE [23:11:33] running test misc-subscription ...
urus:REL_16_STABLE [23:16:21] running test misc-authentication ...
urus:REL_16_STABLE [23:16:37] running misc test module-brin ...
urus:REL_16_STABLE [23:16:50] running misc test module-commit_ts ...
urus:REL_16_STABLE [23:17:15] running misc test module-ldap_password_func ...
urus:REL_16_STABLE [23:17:16] running misc test module-libpq_pipeline ...
urus:REL_16_STABLE [23:17:19] running misc test module-ssl_passphrase_callback ...
urus:REL_16_STABLE [23:17:23] running misc test module-test_custom_rmgrs ...
urus:REL_16_STABLE [23:17:26] running misc test module-test_escape ...
urus:REL_16_STABLE [23:17:29] running misc test module-test_misc ...
urus:REL_16_STABLE [23:17:43] running misc test module-test_pg_dump ...
urus:REL_16_STABLE [23:17:53] running misc test module-libpq ...
urus:REL_16_STABLE [23:18:04] running misc test module-pg_bsd_indent ...
urus:REL_16_STABLE [23:18:08] running contrib test amcheck ...
urus:REL_16_STABLE [23:18:36] running contrib test auto_explain ...
urus:REL_16_STABLE [23:18:43] running contrib test bloom ...
urus:REL_16_STABLE [23:19:03] running contrib test oid2name ...
urus:REL_16_STABLE [23:19:04] running contrib test pg_prewarm ...
urus:REL_16_STABLE [23:19:08] running contrib test test_decoding ...
urus:REL_16_STABLE [23:19:30] running contrib test vacuumlo ...
urus:REL_16_STABLE [23:19:31] setting up db cluster (C)...
urus:REL_16_STABLE [23:19:33] starting db (C)...
urus:REL_16_STABLE [23:19:33] running installcheck (C)...
urus:REL_16_STABLE [23:20:30] restarting db (C)...
urus:REL_16_STABLE [23:20:33] running make isolation check ...
urus:REL_16_STABLE [23:21:09] restarting db (C)...
urus:REL_16_STABLE [23:21:14] running make PL installcheck (C)...
urus:REL_16_STABLE [23:21:18] restarting db (C)...
urus:REL_16_STABLE [23:21:20] running make contrib installcheck (C)...
urus:REL_16_STABLE [23:25:29] restarting db (C)...
urus:REL_16_STABLE [23:25:31] running make test-modules installcheck (C)...
urus:REL_16_STABLE [23:26:31] stopping db (C)...
urus:REL_16_STABLE [23:26:32] running make ecpg check ...
urus:REL_16_STABLE [23:27:15] OK
Branch: REL_16_STABLE
All stages succeeded
Thu Aug 7 04:52:04 2025: buildfarm run for uruspg17:HEAD starting
branch not specified, locks, logs, build artefacts etc will go in HEAD
uruspg17:HEAD [04:52:54] running configure ...
uruspg17:HEAD [04:53:43] running build ...
uruspg17:HEAD [05:05:18] running basic regression tests ...
uruspg17:HEAD [05:10:34] running make contrib ...
uruspg17:HEAD [05:11:40] running make testmodules ...
uruspg17:HEAD [05:11:53] running install ...
uruspg17:HEAD [05:12:20] running make contrib install ...
uruspg17:HEAD [05:12:31] running testmodules install ...
uruspg17:HEAD [05:12:36] running make check miscellaneous modules ...
uruspg17:HEAD [05:13:34] running bin test initdb ...
uruspg17:HEAD [05:13:52] running bin test pg_amcheck ...
uruspg17:HEAD [05:14:17] running bin test pg_archivecleanup ...
uruspg17:HEAD [05:14:17] running bin test pg_basebackup ...
uruspg17:HEAD [05:15:31] running bin test pg_checksums ...
uruspg17:HEAD [05:15:37] running bin test pg_combinebackup ...
uruspg17:HEAD [05:16:55] running bin test pg_config ...
uruspg17:HEAD [05:16:55] running bin test pg_controldata ...
uruspg17:HEAD [05:16:58] running bin test pg_ctl ...
uruspg17:HEAD [05:17:18] running bin test pg_dump ...
uruspg17:HEAD [05:20:19] running bin test pg_resetwal ...
uruspg17:HEAD [05:20:28] running bin test pg_rewind ...
uruspg17:HEAD [05:22:29] running bin test pg_test_fsync ...
uruspg17:HEAD [05:22:30] running bin test pg_test_timing ...
uruspg17:HEAD [05:22:30] running bin test pg_upgrade ...
uruspg17:HEAD [05:30:39] running bin test pg_verifybackup ...
uruspg17:HEAD [05:31:43] running bin test pg_waldump ...
uruspg17:HEAD [05:31:51] running bin test pg_walsummary ...
uruspg17:HEAD [05:31:55] running bin test pgbench ...
uruspg17:HEAD [05:32:24] running bin test psql ...
uruspg17:HEAD [05:32:32] running bin test scripts ...
uruspg17:HEAD [05:33:29] running test misc-recovery ...
uruspg17:HEAD [05:47:05] running test misc-subscription ...
uruspg17:HEAD [05:52:54] running test misc-authentication ...
uruspg17:HEAD [05:53:20] running misc test module-brin ...
uruspg17:HEAD [05:53:39] running misc test module-commit_ts ...
uruspg17:HEAD [05:54:15] running misc test module-ldap_password_func ...
uruspg17:HEAD [05:54:15] running misc test module-libpq_pipeline ...
uruspg17:HEAD [05:54:20] running misc test module-ssl_passphrase_callback ...
uruspg17:HEAD [05:54:25] running misc test module-test_custom_rmgrs ...
uruspg17:HEAD [05:54:30] running misc test module-test_escape ...
uruspg17:HEAD [05:54:34] running misc test module-test_json_parser ...
uruspg17:HEAD [05:54:42] running misc test module-test_misc ...
uruspg17:HEAD [05:54:57] running misc test module-test_pg_dump ...
uruspg17:HEAD [05:55:18] running misc test module-worker_spi ...
uruspg17:HEAD [05:55:23] running misc test module-xid_wraparound ...
uruspg17:HEAD [05:55:24] running misc test module-libpq ...
uruspg17:HEAD [05:55:37] running misc test module-pg_bsd_indent ...
uruspg17:HEAD [05:55:40] running contrib test amcheck ...
uruspg17:HEAD [05:56:12] running contrib test auto_explain ...
uruspg17:HEAD [05:56:15] running contrib test bloom ...
uruspg17:HEAD [05:56:38] running contrib test oid2name ...
uruspg17:HEAD [05:56:39] running contrib test pg_prewarm ...
uruspg17:HEAD [05:56:45] running contrib test pg_stat_statements ...
uruspg17:HEAD [05:56:54] running contrib test pg_visibility ...
uruspg17:HEAD [05:57:01] running contrib test test_decoding ...
uruspg17:HEAD [05:57:24] setting up db cluster (C)...
uruspg17:HEAD [05:57:27] starting db (C)...
uruspg17:HEAD [05:57:27] running installcheck (C)...
uruspg17:HEAD [06:04:38] restarting db (C)...
uruspg17:HEAD [06:04:40] running make isolation check ...
uruspg17:HEAD [06:07:07] restarting db (C)...
uruspg17:HEAD [06:07:13] running make PL installcheck (C)...
uruspg17:HEAD [06:07:19] restarting db (C)...
uruspg17:HEAD [06:07:21] running make contrib installcheck (C)...
uruspg17:HEAD [06:12:56] restarting db (C)...
uruspg17:HEAD [06:12:59] running make test-modules installcheck (C)...
uruspg17:HEAD [06:14:37] stopping db (C)...
uruspg17:HEAD [06:14:37] running make ecpg check ...
uruspg17:HEAD [06:15:26] OK
Branch: HEAD
All stages succeeded
Thu Aug 7 01:40:13 2025: buildfarm run for uruspg18:HEAD starting
branch not specified, locks, logs, build artefacts etc will go in HEAD
uruspg18:HEAD [01:40:24] running configure ...
uruspg18:HEAD [01:41:12] running build ...
uruspg18:HEAD [01:53:12] running basic regression tests ...
uruspg18:HEAD [01:59:36] running make contrib ...
uruspg18:HEAD [02:00:47] running make testmodules ...
uruspg18:HEAD [02:01:03] running install ...
uruspg18:HEAD [02:01:30] running make contrib install ...
uruspg18:HEAD [02:01:43] running testmodules install ...
uruspg18:HEAD [02:01:48] running make check miscellaneous modules ...
uruspg18:HEAD [02:03:00] running bin test initdb ...
uruspg18:HEAD [02:03:21] running bin test pg_amcheck ...
uruspg18:HEAD [02:03:46] running bin test pg_archivecleanup ...
uruspg18:HEAD [02:03:47] running bin test pg_basebackup ...
uruspg18:HEAD [02:05:04] running bin test pg_checksums ...
uruspg18:HEAD [02:05:10] running bin test pg_combinebackup ...
uruspg18:HEAD [02:06:41] running bin test pg_config ...
uruspg18:HEAD [02:06:41] running bin test pg_controldata ...
uruspg18:HEAD [02:06:44] running bin test pg_ctl ...
uruspg18:HEAD [02:07:03] running bin test pg_dump ...
uruspg18:HEAD [02:11:41] running bin test pg_resetwal ...
uruspg18:HEAD [02:11:48] running bin test pg_rewind ...
uruspg18:HEAD [02:13:36] running bin test pg_test_fsync ...
uruspg18:HEAD [02:13:37] running bin test pg_test_timing ...
uruspg18:HEAD [02:13:37] running bin test pg_upgrade ...
uruspg18:HEAD [02:24:35] running bin test pg_verifybackup ...
uruspg18:HEAD [02:26:04] running bin test pg_waldump ...
uruspg18:HEAD [02:26:15] running bin test pg_walsummary ...
uruspg18:HEAD [02:26:20] running bin test pgbench ...
uruspg18:HEAD [02:26:52] running bin test psql ...
uruspg18:HEAD [02:27:02] running bin test scripts ...
uruspg18:HEAD [02:28:09] running test misc-recovery ...
uruspg18:HEAD [02:41:40] running test misc-subscription ...
uruspg18:HEAD [02:48:12] running test misc-authentication ...
uruspg18:HEAD [02:48:42] running misc test module-brin ...
uruspg18:HEAD [02:49:00] running misc test module-commit_ts ...
uruspg18:HEAD [02:49:34] running misc test module-injection_points ...
uruspg18:HEAD [02:49:34] running misc test module-ldap_password_func ...
uruspg18:HEAD [02:49:35] running misc test module-libpq_pipeline ...
uruspg18:HEAD [02:49:40] running misc test module-oauth_validator ...
uruspg18:HEAD [02:49:40] running misc test module-ssl_passphrase_callback ...
uruspg18:HEAD [02:49:45] running misc test module-test_aio ...
uruspg18:HEAD [02:50:02] running misc test module-test_custom_rmgrs ...
uruspg18:HEAD [02:50:06] running misc test module-test_escape ...
uruspg18:HEAD [02:50:11] running misc test module-test_extensions ...
uruspg18:HEAD [02:50:21] running misc test module-test_json_parser ...
uruspg18:HEAD [02:50:51] running misc test module-test_misc ...
uruspg18:HEAD [02:51:11] running misc test module-test_pg_dump ...
uruspg18:HEAD [02:51:35] running misc test module-test_slru ...
uruspg18:HEAD [02:51:39] running misc test module-worker_spi ...
uruspg18:HEAD [02:51:46] running misc test module-xid_wraparound ...
uruspg18:HEAD [02:51:47] running misc test module-libpq ...
uruspg18:HEAD [02:52:08] running misc test module-pg_bsd_indent ...
uruspg18:HEAD [02:52:12] running contrib test amcheck ...
uruspg18:HEAD [02:52:52] running contrib test auto_explain ...
uruspg18:HEAD [02:52:56] running contrib test basebackup_to_shell ...
uruspg18:HEAD [02:53:03] running contrib test bloom ...
uruspg18:HEAD [02:53:27] running contrib test oid2name ...
uruspg18:HEAD [02:53:28] running contrib test pg_stat_statements ...
uruspg18:HEAD [02:53:42] running contrib test postgres_fdw ...
Use of uninitialized value $ENV{"PG_TEST_EXTRA"} in pattern match (m//) at ./run_build.pl line 2510.
uruspg18:HEAD [02:54:02] running contrib test test_decoding ...
uruspg18:HEAD [02:54:25] running contrib test vacuumlo ...
uruspg18:HEAD [02:54:26] setting up db cluster (C)...
uruspg18:HEAD [02:54:29] starting db (C)...
uruspg18:HEAD [02:54:29] running installcheck (C)...
uruspg18:HEAD [03:03:12] restarting db (C)...
uruspg18:HEAD [03:03:14] running make isolation check ...
uruspg18:HEAD [03:05:52] restarting db (C)...
uruspg18:HEAD [03:06:00] running make PL installcheck (C)...
uruspg18:HEAD [03:06:06] restarting db (C)...
uruspg18:HEAD [03:06:08] running make contrib installcheck (C)...
uruspg18:HEAD [03:11:59] restarting db (C)...
uruspg18:HEAD [03:12:02] running make test-modules installcheck (C)...
uruspg18:HEAD [03:14:25] stopping db (C)...
uruspg18:HEAD [03:14:26] running make ecpg check ...
uruspg18:HEAD [03:15:16] OK
Branch: HEAD
All stages succeeded
Attachments:
[application/octet-stream] 0001-AIX-support.v9.patch (15.7K, 3-0001-AIX-support.v9.patch)
download | inline diff:
From 24e96d9849f3e6a6217a284aff717ad4d7f2d45a Mon Sep 17 00:00:00 2001
From: AIX-dev <[email protected]>
Date: Wed, 3 Sep 2025 09:37:14 -0500
Subject: [PATCH] AIX support.
---
Makefile | 2 -
configure | 37 +++++++++++++++---
configure.ac | 29 +++++++++++++-
src/Makefile.shlib | 29 ++++++++++++++
src/backend/Makefile | 20 ++++++++++
src/backend/port/aix/mkldexport.sh | 61 ++++++++++++++++++++++++++++++
src/backend/utils/error/elog.c | 2 +
src/include/port/aix.h | 4 ++
src/include/storage/s_lock.h | 48 +++--------------------
src/makefiles/Makefile.aix | 34 +++++++++++++++++
src/port/strerror.c | 2 +
src/template/aix | 7 ++++
12 files changed, 223 insertions(+), 52 deletions(-)
create mode 100755 src/backend/port/aix/mkldexport.sh
create mode 100644 src/include/port/aix.h
create mode 100644 src/makefiles/Makefile.aix
create mode 100644 src/template/aix
diff --git a/Makefile b/Makefile
index b363b2f2476..786424613ab 100644
--- a/Makefile
+++ b/Makefile
@@ -13,8 +13,6 @@
# AIX make defaults to building *every* target of the first rule. Start with
# a single-target, empty rule to make the other targets non-default.
-# (We don't support AIX anymore, but if someone tries to build on AIX anyway,
-# at least they'll get the instructions to run 'configure' first.)
all:
all check install installdirs installcheck installcheck-parallel uninstall clean distclean maintainer-clean dist distcheck world check-world install-world installcheck-world:
diff --git a/configure b/configure
index 1b9980226c5..abda4be633e 100755
--- a/configure
+++ b/configure
@@ -3022,6 +3022,7 @@ else
# --with-template not given
case $host_os in
+ aix*) template=aix ;;
cygwin*|msys*) template=cygwin ;;
darwin*) template=darwin ;;
dragonfly*) template=netbsd ;;
@@ -17204,13 +17205,37 @@ _ACEOF
# wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too
# much of a penalty for disk and memory space.
-MAX_ALIGNOF=$ac_cv_alignof_double
+echo "Checking for MAX ALIGN - $PORTNAME"
+if test "$PORTNAME" != "aix"; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
-if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
- as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
-fi
-if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF ; then
- as_fn_error $? "alignment of 'int64_t' is greater than the alignment of 'double'" "$LINENO" 5
+ if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
+ as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
+ fi
+ if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $ac_cv_alignof_long_long_int -gt $MAX_ALIGNOF ; then
+ as_fn_error $? "alignment of 'long long int' is greater than the alignment of 'double'" "$LINENO" 5
+ fi
+else
+# The AIX 'power' alignment rules apply the natural alignment of the "first
+# member" if it is of a floating-point data type (or is an aggregate whose
+# recursively "first" member or element is such a type). The alignment
+# associated with these types for subsequent members use an alignment value
+# where the floating-point data type is considered to have 4-byte alignment.
+# More info
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99557
+#
+# The double is aligned to 4-bytes on AIX in aggregates. But to maintain
+# alignement across platforms the max alignment of long should be considered.
+ echo "MAX ALIGN ac_cv_alignof_long"
+ MAX_ALIGNOF=$ac_cv_alignof_long
+ if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
+ echo "MAX ALIGN ac_cv_alignof_double"
+ fi
+ if test $MAX_ALIGNOF -lt $ac_cv_alignof_int64_t; then
+ MAX_ALIGNOF="$ac_cv_alignof_int64_t"
+ echo "MAX ALIGN ac_cv_alignof_int64_t"
+ fi
fi
cat >>confdefs.h <<_ACEOF
diff --git a/configure.ac b/configure.ac
index 3e3fcfa9831..1ef58a1d7a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,6 +62,7 @@ PGAC_ARG_REQ(with, template, [NAME], [override operating system template],
# --with-template not given
case $host_os in
+ aix*) template=aix ;;
cygwin*|msys*) template=cygwin ;;
darwin*) template=darwin ;;
dragonfly*) template=netbsd ;;
@@ -2021,7 +2022,33 @@ AC_CHECK_ALIGNOF(double)
# wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too
# much of a penalty for disk and memory space.
-MAX_ALIGNOF=$ac_cv_alignof_double
+if test "$PORTNAME" != "aix"; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
+
+ if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
+ as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
+ fi
+ if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF; then
+ as_fn_error $? "alignment of 'long long int' is greater than the alignment of 'double'" "$LINENO" 5
+ fi
+else
+# The AIX 'power' alignment rules apply the natural alignment of the "first
+# member" if it is of a floating-point data type (or is an aggregate whose
+# recursively "first" member or element is such a type). The alignment
+# associated with these types for subsequent members use an alignment value
+# where the floating-point data type is considered to have 4-byte alignment.
+# More info
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99557
+#
+# The double is aligned to 4-bytes on AIX in aggregates. But to maintain
+# alignement across platforms the max alignment of long should be considered.
+ MAX_ALIGNOF=$ac_cv_alignof_long
+ if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
+ fi
+ if test $MAX_ALIGNOF -lt $ac_cv_alignof_int64_t ; then
+ MAX_ALIGNOF="$ac_cv_alignof_int64_t"
+ fi
if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
AC_MSG_ERROR([alignment of 'long' is greater than the alignment of 'double'])
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 3825af5b228..35adc4174ed 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -106,6 +106,20 @@ ifdef SO_MAJOR_VERSION
override CPPFLAGS += -DSO_MAJOR_VERSION=$(SO_MAJOR_VERSION)
endif
+ifeq ($(PORTNAME), aix)
+ LINK.shared = $(COMPILER)
+ ifdef SO_MAJOR_VERSION
+ shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
+ endif
+ haslibarule = yes
+ # $(exports_file) is also usable as an import file
+ exports_file = lib$(NAME).exp
+ BUILD.exports = ( echo '\#! $(shlib)'; $(AWK) '/^[^\#]/ {printf "%s\n",$$1}' $< ) > $@
+ ifneq (,$(SHLIB_EXPORTS))
+ LINK.shared += -Wl,-bE:$(exports_file)
+ endif
+endif
+
ifeq ($(PORTNAME), darwin)
ifdef soname
# linkable library
@@ -254,6 +268,14 @@ $(stlib): $(OBJS) | $(SHLIB_PREREQS)
touch $@
endif #haslibarule
+# AIX wraps both shared libraries and static library, which can be used both
+# for static and shared linking
+ifeq ($(PORTNAME), aix)
+$(stlib): $(shlib)
+ rm -f $(stlib)
+ $(AR) $(AROPT) $(stlib) $(shlib)
+endif # aix
+
ifeq (,$(filter cygwin win32,$(PORTNAME)))
# Normal case
@@ -267,8 +289,11 @@ ifneq ($(shlib), $(shlib_major))
endif
# Make sure we have a link to a name without any version numbers
ifneq ($(shlib), $(shlib_bare))
+# except on AIX, where that's not a thing
+ifneq ($(PORTNAME), aix)
rm -f $(shlib_bare)
$(LN_S) $(shlib) $(shlib_bare)
+endif # aix
endif # shlib_bare
endif # shlib_major
@@ -376,6 +401,9 @@ install-lib-static: $(stlib) installdirs-lib
install-lib-shared: $(shlib) installdirs-lib
ifdef soname
+# we don't install $(shlib) on AIX
+# (see http://archives.postgresql.org/message-id/52EF20B2E3209443BC37736D00C3C1380A6E79FE@EXADV1.host.magwien.gv.at)
+ifneq ($(PORTNAME), aix)
$(INSTALL_SHLIB) $< '$(DESTDIR)$(libdir)/$(shlib)'
ifneq ($(PORTNAME), cygwin)
ifneq ($(PORTNAME), win32)
@@ -391,6 +419,7 @@ ifneq ($(shlib), $(shlib_bare))
endif
endif # not win32
endif # not cygwin
+endif # not aix
ifneq (,$(findstring $(PORTNAME),win32 cygwin))
$(INSTALL_SHLIB) $< '$(DESTDIR)$(bindir)/$(shlib)'
endif
diff --git a/src/backend/Makefile b/src/backend/Makefile
index 7344c8c7f5c..572f5430a60 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -63,12 +63,14 @@ all: submake-libpgport submake-catalog-headers submake-utils-headers postgres $(
ifneq ($(PORTNAME), cygwin)
ifneq ($(PORTNAME), win32)
+ifneq ($(PORTNAME), aix)
postgres: $(OBJS)
$(CC) $(CFLAGS) $(call expand_subsys,$^) $(LDFLAGS) $(LIBS) -o $@
endif
endif
+endif
ifeq ($(PORTNAME), cygwin)
@@ -95,6 +97,24 @@ libpostgres.a: postgres
endif # win32
+ifeq ($(PORTNAME), aix)
+
+postgres: $(POSTGRES_IMP)
+ $(CC) $(CFLAGS) $(call expand_subsys,$(OBJS)) $(LDFLAGS) -Wl,-bE:$(top_builddir)/src/backend/$(POSTGRES_IMP) $(LIBS) -Wl,-brtllib -o $@
+
+# Linking to a single .o with -r is a lot faster than building a .a or passing
+# all objects to MKLDEXPORT.
+#
+# It looks alluring to use $(CC) -r instead of ld -r, but that doesn't
+# trivially work with gcc, due to gcc specific static libraries linked in with
+# -r.
+$(POSTGRES_IMP): $(OBJS)
+ ld -r -o SUBSYS.o $(call expand_subsys,$^)
+ $(MKLDEXPORT) SUBSYS.o . > $@
+ @rm -f SUBSYS.o
+
+endif # aix
+
$(top_builddir)/src/port/libpgport_srv.a: | submake-libpgport
diff --git a/src/backend/port/aix/mkldexport.sh b/src/backend/port/aix/mkldexport.sh
new file mode 100755
index 00000000000..adf3793e868
--- /dev/null
+++ b/src/backend/port/aix/mkldexport.sh
@@ -0,0 +1,61 @@
+#!/bin/sh
+#
+# mkldexport
+# create an AIX exports file from an object file
+#
+# src/backend/port/aix/mkldexport.sh
+#
+# Usage:
+# mkldexport objectfile [location]
+# where
+# objectfile is the current location of the object file.
+# location is the eventual (installed) location of the
+# object file (if different from the current
+# working directory).
+#
+# [This file comes from the Postgres 4.2 distribution. - ay 7/95]
+#
+# Header: /usr/local/devel/postgres/src/tools/mkldexport/RCS/mkldexport.sh,v 1.2 1994/03/13 04:59:12 aoki Exp
+#
+
+# setting this to nm -B might be better
+# ... due to changes in AIX 4.x ...
+# ... let us search in different directories - Gerhard Reithofer
+if [ -x /usr/ucb/nm ]
+then NM=/usr/ucb/nm
+elif [ -x /usr/bin/nm ]
+then NM=/usr/bin/nm
+elif [ -x /usr/ccs/bin/nm ]
+then NM=/usr/ccs/bin/nm
+elif [ -x /usr/usg/bin/nm ]
+then NM=/usr/usg/bin/nm
+else echo "Fatal error: cannot find `nm' ... please check your installation."
+ exit 1
+fi
+
+CMDNAME=`basename $0`
+if [ -z "$1" ]; then
+ echo "Usage: $CMDNAME object [location]"
+ exit 1
+fi
+OBJNAME=`basename $1`
+if [ "`basename $OBJNAME`" != "`basename $OBJNAME .o`" ]; then
+ OBJNAME=`basename $OBJNAME .o`.so
+fi
+if [ -z "$2" ]; then
+ echo '#!'
+else
+ if [ "$2" = "." ]; then
+ # for the base executable (AIX 4.2 and up)
+ echo '#! .'
+ else
+ echo '#!' $2
+ fi
+fi
+$NM -BCg $1 | \
+ egrep ' [TDB] ' | \
+ sed -e 's/.* //' | \
+ egrep -v '\$' | \
+ sed -e 's/^[.]//' | \
+ sort | \
+ uniq
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index 47af743990f..f0f4ff051b5 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -905,7 +905,9 @@ errcode_for_file_access(void)
/* Wrong object type or state */
case ENOTDIR: /* Not a directory */
case EISDIR: /* Is a directory */
+#if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */
case ENOTEMPTY: /* Directory not empty */
+#endif
edata->sqlerrcode = ERRCODE_WRONG_OBJECT_TYPE;
break;
diff --git a/src/include/port/aix.h b/src/include/port/aix.h
new file mode 100644
index 00000000000..7d08480c8c0
--- /dev/null
+++ b/src/include/port/aix.h
@@ -0,0 +1,4 @@
+/*
+ * src/include/port/aix.h
+ */
+
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index 2f73f9fcf57..ba120c08d14 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -398,56 +398,18 @@ typedef unsigned int slock_t;
#define TAS(lock) tas(lock)
-/* On PPC, it's a win to use a non-locking test before the lwarx */
+/* On PPC, use the compiler provided Built-in functions for atomic memory
+ * exchange operations.
+ */
#define TAS_SPIN(lock) (*(lock) ? 1 : TAS(lock))
-/*
- * The second operand of addi can hold a constant zero or a register number,
- * hence constraint "=&b" to avoid allocating r0. "b" stands for "address
- * base register"; most operands having this register-or-zero property are
- * address bases, e.g. the second operand of lwax.
- *
- * NOTE: per the Enhanced PowerPC Architecture manual, v1.0 dated 7-May-2002,
- * an isync is a sufficient synchronization barrier after a lwarx/stwcx loop.
- * But if the spinlock is in ordinary memory, we can use lwsync instead for
- * better performance.
- */
static __inline__ int
tas(volatile slock_t *lock)
{
- slock_t _t;
- int _res;
-
- __asm__ __volatile__(
-" lwarx %0,0,%3,1 \n"
-" cmpwi %0,0 \n"
-" bne 1f \n"
-" addi %0,%0,1 \n"
-" stwcx. %0,0,%3 \n"
-" beq 2f \n"
-"1: \n"
-" li %1,1 \n"
-" b 3f \n"
-"2: \n"
-" lwsync \n"
-" li %1,0 \n"
-"3: \n"
-: "=&b"(_t), "=r"(_res), "+m"(*lock)
-: "r"(lock)
-: "memory", "cc");
- return _res;
+ return __sync_lock_test_and_set(lock, 1);
}
-/*
- * PowerPC S_UNLOCK is almost standard but requires a "sync" instruction.
- * But we can use lwsync instead for better performance.
- */
-#define S_UNLOCK(lock) \
-do \
-{ \
- __asm__ __volatile__ (" lwsync \n" ::: "memory"); \
- *((volatile slock_t *) (lock)) = 0; \
-} while (0)
+#define S_UNLOCK(lock) __sync_lock_release(lock)
#endif /* powerpc */
diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix
new file mode 100644
index 00000000000..4c4de8b0be7
--- /dev/null
+++ b/src/makefiles/Makefile.aix
@@ -0,0 +1,34 @@
+# -blibpath:
+# The path to be inserted into the default path (Index 0 path) field of the
+# loader section. When this flag is presented, the -L paths will not be stored.
+# AIX uses a stricter, more explicit approach. The runtime linker expects to
+# tell it exactly where to look using -blibpath.
+# -blibpath must contain ALL directories where we should look for libraries
+libpath := $(shell echo $(subst -L,:,$(filter -L/%,$(LDFLAGS))) | sed -e's/ //g'):/usr/lib:/lib
+
+# AIX uses a stricter, more explicit approach. The runtime linker expects
+# to tell it exactly where to look using -blibpath.
+rpath = -Wl,-blibpath:'$(rpathdir)$(libpath)'
+
+# gcc needs to know it's building a shared lib, otherwise it'll not emit
+# correct code / link to the right support libraries
+ifeq ($(GCC), yes)
+LDFLAGS_SL += -shared
+endif
+
+# env var name to use in place of LD_LIBRARY_PATH
+ld_library_path_var = LIBPATH
+
+POSTGRES_IMP= postgres.imp
+
+ifdef PGXS
+BE_DLLLIBS= -Wl,-bI:$(pkglibdir)/$(POSTGRES_IMP)
+else
+BE_DLLLIBS= -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP)
+endif
+
+MKLDEXPORT_DIR=src/backend/port/aix
+MKLDEXPORT=$(top_srcdir)/$(MKLDEXPORT_DIR)/mkldexport.sh
+
+%$(DLSUFFIX): %.o
+ $(CC) $(CFLAGS) $*.o $(LDFLAGS) $(LDFLAGS_SL) -o $@ $(BE_DLLLIBS)
diff --git a/src/port/strerror.c b/src/port/strerror.c
index f0746517770..c46b9dc91fc 100644
--- a/src/port/strerror.c
+++ b/src/port/strerror.c
@@ -214,8 +214,10 @@ get_errno_symbol(int errnum)
return "ENOTCONN";
case ENOTDIR:
return "ENOTDIR";
+#if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */
case ENOTEMPTY:
return "ENOTEMPTY";
+#endif
case ENOTSOCK:
return "ENOTSOCK";
#ifdef ENOTSUP
diff --git a/src/template/aix b/src/template/aix
new file mode 100644
index 00000000000..bfc193348f4
--- /dev/null
+++ b/src/template/aix
@@ -0,0 +1,7 @@
+# This file is referred for specific flags wrt to AIX build process like
+# cflags.
+# src/template/aix
+
+# Extra CFLAGS for code that will go into a shared library
+# With optimization, the MemSet() and MemSetAlign() perform better.
+CFLAGS_SL=" -O2 "
--
2.41.0
[text/plain] build-farm-19.pg16.log (4.3K, 4-build-farm-19.pg16.log)
download | inline:
Sun Aug 10 22:34:32 2025: buildfarm run for urus:REL_16_STABLE starting
urus:REL_16_STABLE [22:34:43] checking out source ...
running git clone -q /home/pgdev/bfarm/build-farm-19.1.16/buildroot/pgmirror.git "/home/pgdev/bfarm/build-farm-19.1.16/buildroot/HEAD/pgsql"
urus:REL_16_STABLE [22:41:18] checking if build run needed ...
urus:REL_16_STABLE [22:41:18] copying source to pgsql.build ...
urus:REL_16_STABLE [22:41:27] running configure ...
urus:REL_16_STABLE [22:42:11] running build ...
urus:REL_16_STABLE [22:53:07] running basic regression tests ...
urus:REL_16_STABLE [22:54:23] running make contrib ...
urus:REL_16_STABLE [22:55:29] running make testmodules ...
urus:REL_16_STABLE [22:55:39] running install ...
urus:REL_16_STABLE [22:56:09] running make contrib install ...
urus:REL_16_STABLE [22:56:19] running testmodules install ...
urus:REL_16_STABLE [22:56:24] running make check miscellaneous modules ...
urus:REL_16_STABLE [22:57:41] running bin test initdb ...
urus:REL_16_STABLE [22:57:52] running bin test pg_amcheck ...
urus:REL_16_STABLE [22:58:11] running bin test pg_archivecleanup ...
urus:REL_16_STABLE [22:58:12] running bin test pg_basebackup ...
urus:REL_16_STABLE [22:59:02] running bin test pg_checksums ...
urus:REL_16_STABLE [22:59:09] running bin test pg_config ...
urus:REL_16_STABLE [22:59:09] running bin test pg_controldata ...
urus:REL_16_STABLE [22:59:12] running bin test pg_ctl ...
urus:REL_16_STABLE [22:59:31] running bin test pg_dump ...
urus:REL_16_STABLE [23:00:10] running bin test pg_resetwal ...
urus:REL_16_STABLE [23:00:15] running bin test pg_rewind ...
urus:REL_16_STABLE [23:01:49] running bin test pg_test_fsync ...
urus:REL_16_STABLE [23:01:50] running bin test pg_test_timing ...
urus:REL_16_STABLE [23:01:50] running bin test pg_upgrade ...
urus:REL_16_STABLE [23:02:55] running bin test pg_verifybackup ...
urus:REL_16_STABLE [23:03:57] running bin test pg_waldump ...
urus:REL_16_STABLE [23:04:01] running bin test pgbench ...
urus:REL_16_STABLE [23:04:13] running bin test psql ...
urus:REL_16_STABLE [23:04:20] running bin test scripts ...
urus:REL_16_STABLE [23:05:10] running test misc-recovery ...
urus:REL_16_STABLE [23:11:33] running test misc-subscription ...
urus:REL_16_STABLE [23:16:21] running test misc-authentication ...
urus:REL_16_STABLE [23:16:37] running misc test module-brin ...
urus:REL_16_STABLE [23:16:50] running misc test module-commit_ts ...
urus:REL_16_STABLE [23:17:15] running misc test module-ldap_password_func ...
urus:REL_16_STABLE [23:17:16] running misc test module-libpq_pipeline ...
urus:REL_16_STABLE [23:17:19] running misc test module-ssl_passphrase_callback ...
urus:REL_16_STABLE [23:17:23] running misc test module-test_custom_rmgrs ...
urus:REL_16_STABLE [23:17:26] running misc test module-test_escape ...
urus:REL_16_STABLE [23:17:29] running misc test module-test_misc ...
urus:REL_16_STABLE [23:17:43] running misc test module-test_pg_dump ...
urus:REL_16_STABLE [23:17:53] running misc test module-libpq ...
urus:REL_16_STABLE [23:18:04] running misc test module-pg_bsd_indent ...
urus:REL_16_STABLE [23:18:08] running contrib test amcheck ...
urus:REL_16_STABLE [23:18:36] running contrib test auto_explain ...
urus:REL_16_STABLE [23:18:43] running contrib test bloom ...
urus:REL_16_STABLE [23:19:03] running contrib test oid2name ...
urus:REL_16_STABLE [23:19:04] running contrib test pg_prewarm ...
urus:REL_16_STABLE [23:19:08] running contrib test test_decoding ...
urus:REL_16_STABLE [23:19:30] running contrib test vacuumlo ...
urus:REL_16_STABLE [23:19:31] setting up db cluster (C)...
urus:REL_16_STABLE [23:19:33] starting db (C)...
urus:REL_16_STABLE [23:19:33] running installcheck (C)...
urus:REL_16_STABLE [23:20:30] restarting db (C)...
urus:REL_16_STABLE [23:20:33] running make isolation check ...
urus:REL_16_STABLE [23:21:09] restarting db (C)...
urus:REL_16_STABLE [23:21:14] running make PL installcheck (C)...
urus:REL_16_STABLE [23:21:18] restarting db (C)...
urus:REL_16_STABLE [23:21:20] running make contrib installcheck (C)...
urus:REL_16_STABLE [23:25:29] restarting db (C)...
urus:REL_16_STABLE [23:25:31] running make test-modules installcheck (C)...
urus:REL_16_STABLE [23:26:31] stopping db (C)...
urus:REL_16_STABLE [23:26:32] running make ecpg check ...
urus:REL_16_STABLE [23:27:15] OK
Branch: REL_16_STABLE
All stages succeeded
[text/plain] build-farm-19.pg17.log (4.7K, 5-build-farm-19.pg17.log)
download | inline:
Thu Aug 7 04:52:04 2025: buildfarm run for uruspg17:HEAD starting
branch not specified, locks, logs, build artefacts etc will go in HEAD
uruspg17:HEAD [04:52:54] running configure ...
uruspg17:HEAD [04:53:43] running build ...
uruspg17:HEAD [05:05:18] running basic regression tests ...
uruspg17:HEAD [05:10:34] running make contrib ...
uruspg17:HEAD [05:11:40] running make testmodules ...
uruspg17:HEAD [05:11:53] running install ...
uruspg17:HEAD [05:12:20] running make contrib install ...
uruspg17:HEAD [05:12:31] running testmodules install ...
uruspg17:HEAD [05:12:36] running make check miscellaneous modules ...
uruspg17:HEAD [05:13:34] running bin test initdb ...
uruspg17:HEAD [05:13:52] running bin test pg_amcheck ...
uruspg17:HEAD [05:14:17] running bin test pg_archivecleanup ...
uruspg17:HEAD [05:14:17] running bin test pg_basebackup ...
uruspg17:HEAD [05:15:31] running bin test pg_checksums ...
uruspg17:HEAD [05:15:37] running bin test pg_combinebackup ...
uruspg17:HEAD [05:16:55] running bin test pg_config ...
uruspg17:HEAD [05:16:55] running bin test pg_controldata ...
uruspg17:HEAD [05:16:58] running bin test pg_ctl ...
uruspg17:HEAD [05:17:18] running bin test pg_dump ...
uruspg17:HEAD [05:20:19] running bin test pg_resetwal ...
uruspg17:HEAD [05:20:28] running bin test pg_rewind ...
uruspg17:HEAD [05:22:29] running bin test pg_test_fsync ...
uruspg17:HEAD [05:22:30] running bin test pg_test_timing ...
uruspg17:HEAD [05:22:30] running bin test pg_upgrade ...
uruspg17:HEAD [05:30:39] running bin test pg_verifybackup ...
uruspg17:HEAD [05:31:43] running bin test pg_waldump ...
uruspg17:HEAD [05:31:51] running bin test pg_walsummary ...
uruspg17:HEAD [05:31:55] running bin test pgbench ...
uruspg17:HEAD [05:32:24] running bin test psql ...
uruspg17:HEAD [05:32:32] running bin test scripts ...
uruspg17:HEAD [05:33:29] running test misc-recovery ...
uruspg17:HEAD [05:47:05] running test misc-subscription ...
uruspg17:HEAD [05:52:54] running test misc-authentication ...
uruspg17:HEAD [05:53:20] running misc test module-brin ...
uruspg17:HEAD [05:53:39] running misc test module-commit_ts ...
uruspg17:HEAD [05:54:15] running misc test module-ldap_password_func ...
uruspg17:HEAD [05:54:15] running misc test module-libpq_pipeline ...
uruspg17:HEAD [05:54:20] running misc test module-ssl_passphrase_callback ...
uruspg17:HEAD [05:54:25] running misc test module-test_custom_rmgrs ...
uruspg17:HEAD [05:54:30] running misc test module-test_escape ...
uruspg17:HEAD [05:54:34] running misc test module-test_json_parser ...
uruspg17:HEAD [05:54:42] running misc test module-test_misc ...
uruspg17:HEAD [05:54:57] running misc test module-test_pg_dump ...
uruspg17:HEAD [05:55:18] running misc test module-worker_spi ...
uruspg17:HEAD [05:55:23] running misc test module-xid_wraparound ...
uruspg17:HEAD [05:55:24] running misc test module-libpq ...
uruspg17:HEAD [05:55:37] running misc test module-pg_bsd_indent ...
uruspg17:HEAD [05:55:40] running contrib test amcheck ...
uruspg17:HEAD [05:56:12] running contrib test auto_explain ...
uruspg17:HEAD [05:56:15] running contrib test bloom ...
uruspg17:HEAD [05:56:38] running contrib test oid2name ...
uruspg17:HEAD [05:56:39] running contrib test pg_prewarm ...
uruspg17:HEAD [05:56:45] running contrib test pg_stat_statements ...
uruspg17:HEAD [05:56:54] running contrib test pg_visibility ...
uruspg17:HEAD [05:57:01] running contrib test test_decoding ...
uruspg17:HEAD [05:57:24] setting up db cluster (C)...
uruspg17:HEAD [05:57:27] starting db (C)...
uruspg17:HEAD [05:57:27] running installcheck (C)...
uruspg17:HEAD [06:04:38] restarting db (C)...
uruspg17:HEAD [06:04:40] running make isolation check ...
uruspg17:HEAD [06:07:07] restarting db (C)...
uruspg17:HEAD [06:07:13] running make PL installcheck (C)...
uruspg17:HEAD [06:07:19] restarting db (C)...
uruspg17:HEAD [06:07:21] running make contrib installcheck (C)...
uruspg17:HEAD [06:12:56] restarting db (C)...
uruspg17:HEAD [06:12:59] running make test-modules installcheck (C)...
uruspg17:HEAD [06:14:37] stopping db (C)...
uruspg17:HEAD [06:14:37] running make ecpg check ...
uruspg17:HEAD [06:15:26] OK
Branch: HEAD
All stages succeeded
[text/plain] build-farm-19.pg18.log (5.3K, 6-build-farm-19.pg18.log)
download | inline:
Thu Aug 7 01:40:13 2025: buildfarm run for uruspg18:HEAD starting
branch not specified, locks, logs, build artefacts etc will go in HEAD
uruspg18:HEAD [01:40:24] running configure ...
uruspg18:HEAD [01:41:12] running build ...
uruspg18:HEAD [01:53:12] running basic regression tests ...
uruspg18:HEAD [01:59:36] running make contrib ...
uruspg18:HEAD [02:00:47] running make testmodules ...
uruspg18:HEAD [02:01:03] running install ...
uruspg18:HEAD [02:01:30] running make contrib install ...
uruspg18:HEAD [02:01:43] running testmodules install ...
uruspg18:HEAD [02:01:48] running make check miscellaneous modules ...
uruspg18:HEAD [02:03:00] running bin test initdb ...
uruspg18:HEAD [02:03:21] running bin test pg_amcheck ...
uruspg18:HEAD [02:03:46] running bin test pg_archivecleanup ...
uruspg18:HEAD [02:03:47] running bin test pg_basebackup ...
uruspg18:HEAD [02:05:04] running bin test pg_checksums ...
uruspg18:HEAD [02:05:10] running bin test pg_combinebackup ...
uruspg18:HEAD [02:06:41] running bin test pg_config ...
uruspg18:HEAD [02:06:41] running bin test pg_controldata ...
uruspg18:HEAD [02:06:44] running bin test pg_ctl ...
uruspg18:HEAD [02:07:03] running bin test pg_dump ...
uruspg18:HEAD [02:11:41] running bin test pg_resetwal ...
uruspg18:HEAD [02:11:48] running bin test pg_rewind ...
uruspg18:HEAD [02:13:36] running bin test pg_test_fsync ...
uruspg18:HEAD [02:13:37] running bin test pg_test_timing ...
uruspg18:HEAD [02:13:37] running bin test pg_upgrade ...
uruspg18:HEAD [02:24:35] running bin test pg_verifybackup ...
uruspg18:HEAD [02:26:04] running bin test pg_waldump ...
uruspg18:HEAD [02:26:15] running bin test pg_walsummary ...
uruspg18:HEAD [02:26:20] running bin test pgbench ...
uruspg18:HEAD [02:26:52] running bin test psql ...
uruspg18:HEAD [02:27:02] running bin test scripts ...
uruspg18:HEAD [02:28:09] running test misc-recovery ...
uruspg18:HEAD [02:41:40] running test misc-subscription ...
uruspg18:HEAD [02:48:12] running test misc-authentication ...
uruspg18:HEAD [02:48:42] running misc test module-brin ...
uruspg18:HEAD [02:49:00] running misc test module-commit_ts ...
uruspg18:HEAD [02:49:34] running misc test module-injection_points ...
uruspg18:HEAD [02:49:34] running misc test module-ldap_password_func ...
uruspg18:HEAD [02:49:35] running misc test module-libpq_pipeline ...
uruspg18:HEAD [02:49:40] running misc test module-oauth_validator ...
uruspg18:HEAD [02:49:40] running misc test module-ssl_passphrase_callback ...
uruspg18:HEAD [02:49:45] running misc test module-test_aio ...
uruspg18:HEAD [02:50:02] running misc test module-test_custom_rmgrs ...
uruspg18:HEAD [02:50:06] running misc test module-test_escape ...
uruspg18:HEAD [02:50:11] running misc test module-test_extensions ...
uruspg18:HEAD [02:50:21] running misc test module-test_json_parser ...
uruspg18:HEAD [02:50:51] running misc test module-test_misc ...
uruspg18:HEAD [02:51:11] running misc test module-test_pg_dump ...
uruspg18:HEAD [02:51:35] running misc test module-test_slru ...
uruspg18:HEAD [02:51:39] running misc test module-worker_spi ...
uruspg18:HEAD [02:51:46] running misc test module-xid_wraparound ...
uruspg18:HEAD [02:51:47] running misc test module-libpq ...
uruspg18:HEAD [02:52:08] running misc test module-pg_bsd_indent ...
uruspg18:HEAD [02:52:12] running contrib test amcheck ...
uruspg18:HEAD [02:52:52] running contrib test auto_explain ...
uruspg18:HEAD [02:52:56] running contrib test basebackup_to_shell ...
uruspg18:HEAD [02:53:03] running contrib test bloom ...
uruspg18:HEAD [02:53:27] running contrib test oid2name ...
uruspg18:HEAD [02:53:28] running contrib test pg_stat_statements ...
uruspg18:HEAD [02:53:42] running contrib test postgres_fdw ...
Use of uninitialized value $ENV{"PG_TEST_EXTRA"} in pattern match (m//) at ./run_build.pl line 2510.
uruspg18:HEAD [02:54:02] running contrib test test_decoding ...
uruspg18:HEAD [02:54:25] running contrib test vacuumlo ...
uruspg18:HEAD [02:54:26] setting up db cluster (C)...
uruspg18:HEAD [02:54:29] starting db (C)...
uruspg18:HEAD [02:54:29] running installcheck (C)...
uruspg18:HEAD [03:03:12] restarting db (C)...
uruspg18:HEAD [03:03:14] running make isolation check ...
uruspg18:HEAD [03:05:52] restarting db (C)...
uruspg18:HEAD [03:06:00] running make PL installcheck (C)...
uruspg18:HEAD [03:06:06] restarting db (C)...
uruspg18:HEAD [03:06:08] running make contrib installcheck (C)...
uruspg18:HEAD [03:11:59] restarting db (C)...
uruspg18:HEAD [03:12:02] running make test-modules installcheck (C)...
uruspg18:HEAD [03:14:25] stopping db (C)...
uruspg18:HEAD [03:14:26] running make ecpg check ...
uruspg18:HEAD [03:15:16] OK
Branch: HEAD
All stages succeeded
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-09-11 05:20 Vamshikrishna T <[email protected]>
parent: Srirama Kucherlapati <[email protected]>
1 sibling, 2 replies; 29+ messages in thread
From: Vamshikrishna T @ 2025-09-11 05:20 UTC (permalink / raw)
To: Srirama Kucherlapati <[email protected]>; +Cc: Heikki Linnakangas <[email protected]>; pgsql-hackers; Robert Haas <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>; wenhui qiu <[email protected]>; [email protected] <[email protected]>
Hi Team,
Just checking in regarding the AIX support patch shared earlier. As
mentioned, we’ve successfully run the patch across all stable PostgreSQL
releases using the build farm, and all tests—including TAP—have passed. We
also ran the build farm scripts locally for PostgreSQL 17 and 18 on AIX,
and the test results were attached for your reference.
We’d appreciate your review and feedback on the patch. Once we receive your
input, our next steps will be:
1. Address any comments or suggestions you may have.
2. Finalize the patch based on feedback.
3. Proceed with integration into the relevant branches.
Please let us know if you need any additional details or clarification.
Thanks
Vamshi.
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-09-11 06:12 Laurenz Albe <[email protected]>
parent: Vamshikrishna T <[email protected]>
1 sibling, 1 reply; 29+ messages in thread
From: Laurenz Albe @ 2025-09-11 06:12 UTC (permalink / raw)
To: Vamshikrishna T <[email protected]>; Srirama Kucherlapati <[email protected]>; +Cc: Heikki Linnakangas <[email protected]>; pgsql-hackers; Robert Haas <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>; wenhui qiu <[email protected]>; [email protected] <[email protected]>
On Thu, 2025-09-11 at 10:50 +0530, Vamshikrishna T wrote:
> Just checking in regarding the AIX support patch shared earlier.
Did you create a commitfest entry?
That way, your patch is less likely to fall between the cracks.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-09-11 10:48 Vamshikrishna T <[email protected]>
parent: Laurenz Albe <[email protected]>
0 siblings, 0 replies; 29+ messages in thread
From: Vamshikrishna T @ 2025-09-11 10:48 UTC (permalink / raw)
To: [email protected]; +Cc: AIX PG user <[email protected]>
Thank you Laurenz for the info, Raised the review request here.
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-09-15 23:44 Bruce Momjian <[email protected]>
parent: Vamshikrishna T <[email protected]>
1 sibling, 1 reply; 29+ messages in thread
From: Bruce Momjian @ 2025-09-15 23:44 UTC (permalink / raw)
To: Vamshikrishna T <[email protected]>; +Cc: Srirama Kucherlapati <[email protected]>; Heikki Linnakangas <[email protected]>; pgsql-hackers; Robert Haas <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>; wenhui qiu <[email protected]>; [email protected] <[email protected]>
On Thu, Sep 11, 2025 at 10:50:45AM +0530, Vamshikrishna T wrote:
> We’d appreciate your review and feedback on the patch. Once we receive your
> input, our next steps will be:
>
> 1. Address any comments or suggestions you may have.
>
> 2. Finalize the patch based on feedback.
>
> 3. Proceed with integration into the relevant branches.
I assume the only relevant branch is PG 19.
--
Bruce Momjian <[email protected]> https://momjian.us
EDB https://enterprisedb.com
Do not let urgent matters crowd out time for investment in the future.
^ permalink raw reply [nested|flat] 29+ messages in thread
* RE: AIX support
@ 2025-09-16 15:13 Srirama Kucherlapati <[email protected]>
parent: Bruce Momjian <[email protected]>
0 siblings, 1 reply; 29+ messages in thread
From: Srirama Kucherlapati @ 2025-09-16 15:13 UTC (permalink / raw)
To: Bruce Momjian <[email protected]>; Vamshikrishna T <[email protected]>; +Cc: Heikki Linnakangas <[email protected]>; pgsql-hackers; Robert Haas <[email protected]>; Peter Eisentraut <[email protected]>; Alvaro Herrera <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>; wenhui qiu <[email protected]>; [email protected] <[email protected]>
Hi Bruce,
Please find the attached patch that is run on master branch PG19.
Kindly request you to go through and let us know your feedback.
Also attached are the builfarm results.
Warm regards,
Sriram.
Mon Sep 15 18:56:20 2025: buildfarm run for uruspg19:HEAD starting
branch not specified, locks, logs, build artefacts etc will go in HEAD
uruspg19:HEAD [18:59:44] running configure ...
uruspg19:HEAD [19:01:04] running build ...
uruspg19:HEAD [19:01:52] running basic regression tests ...
uruspg19:HEAD [19:10:10] running make contrib ...
uruspg19:HEAD [19:10:11] running make testmodules ...
uruspg19:HEAD [19:10:12] running install ...
uruspg19:HEAD [19:10:56] running make contrib install ...
uruspg19:HEAD [19:11:12] running testmodules install ...
uruspg19:HEAD [19:11:19] running make check miscellaneous modules ...
uruspg19:HEAD [19:13:31] running bin test initdb ...
uruspg19:HEAD [19:13:57] running bin test pg_amcheck ...
uruspg19:HEAD [19:14:23] running bin test pg_archivecleanup ...
uruspg19:HEAD [19:14:24] running bin test pg_basebackup ...
uruspg19:HEAD [19:15:38] running bin test pg_checksums ...
uruspg19:HEAD [19:15:45] running bin test pg_combinebackup ...
uruspg19:HEAD [19:17:10] running bin test pg_config ...
uruspg19:HEAD [19:17:10] running bin test pg_controldata ...
uruspg19:HEAD [19:17:13] running bin test pg_ctl ...
uruspg19:HEAD [19:17:31] running bin test pg_dump ...
uruspg19:HEAD [19:20:40] running bin test pg_resetwal ...
uruspg19:HEAD [19:20:46] running bin test pg_rewind ...
uruspg19:HEAD [19:22:25] running bin test pg_test_fsync ...
uruspg19:HEAD [19:22:26] running bin test pg_test_timing ...
uruspg19:HEAD [19:22:28] running bin test pg_upgrade ...
uruspg19:HEAD [19:33:01] running bin test pg_verifybackup ...
uruspg19:HEAD [19:34:38] running bin test pg_waldump ...
uruspg19:HEAD [19:34:49] running bin test pg_walsummary ...
uruspg19:HEAD [19:34:54] running bin test pgbench ...
uruspg19:HEAD [19:35:25] running bin test psql ...
uruspg19:HEAD [19:35:34] running bin test scripts ...
uruspg19:HEAD [19:36:55] running test misc-recovery ...
uruspg19:HEAD [19:57:56] running test misc-subscription ...
uruspg19:HEAD [20:05:06] running test misc-authentication ...
uruspg19:HEAD [20:05:30] running misc test module-brin ...
uruspg19:HEAD [20:05:44] running misc test module-commit_ts ...
uruspg19:HEAD [20:06:10] running misc test module-injection_points ...
uruspg19:HEAD [20:06:10] running misc test module-ldap_password_func ...
uruspg19:HEAD [20:06:11] running misc test module-libpq_pipeline ...
uruspg19:HEAD [20:06:15] running misc test module-oauth_validator ...
uruspg19:HEAD [20:06:16] running misc test module-ssl_passphrase_callback ...
uruspg19:HEAD [20:06:19] running misc test module-test_aio ...
uruspg19:HEAD [20:06:34] running misc test module-test_custom_rmgrs ...
uruspg19:HEAD [20:06:37] running misc test module-test_escape ...
uruspg19:HEAD [20:06:41] running misc test module-test_extensions ...
uruspg19:HEAD [20:06:48] running misc test module-test_int128 ...
uruspg19:HEAD [20:06:49] running misc test module-test_json_parser ...
uruspg19:HEAD [20:07:19] running misc test module-test_misc ...
uruspg19:HEAD [20:07:34] running misc test module-test_pg_dump ...
uruspg19:HEAD [20:07:56] running misc test module-test_slru ...
uruspg19:HEAD [20:07:59] running misc test module-worker_spi ...
uruspg19:HEAD [20:08:05] running misc test module-xid_wraparound ...
uruspg19:HEAD [20:08:06] running misc test module-libpq ...
uruspg19:HEAD [20:08:25] running misc test module-pg_bsd_indent ...
uruspg19:HEAD [20:08:29] running contrib test amcheck ...
uruspg19:HEAD [20:09:09] running contrib test auto_explain ...
uruspg19:HEAD [20:09:16] running contrib test basebackup_to_shell ...
uruspg19:HEAD [20:09:23] running contrib test bloom ...
uruspg19:HEAD [20:09:48] running contrib test oid2name ...
uruspg19:HEAD [20:09:49] running contrib test pg_stat_statements ...
uruspg19:HEAD [20:10:03] running contrib test postgres_fdw ...
Use of uninitialized value $ENV{"PG_TEST_EXTRA"} in pattern match (m//) at ./run_build.pl line 2510.
uruspg19:HEAD [20:10:24] running contrib test test_decoding ...
uruspg19:HEAD [20:10:47] running contrib test vacuumlo ...
uruspg19:HEAD [20:10:48] setting up db cluster (C)...
uruspg19:HEAD [20:10:50] starting db (C)...
uruspg19:HEAD [20:10:50] running installcheck (C)...
uruspg19:HEAD [20:19:31] restarting db (C)...
uruspg19:HEAD [20:19:34] running make isolation check ...
uruspg19:HEAD [20:22:11] restarting db (C)...
uruspg19:HEAD [20:22:18] running make PL installcheck (C)...
uruspg19:HEAD [20:22:24] restarting db (C)...
uruspg19:HEAD [20:22:26] running make contrib installcheck (C)...
uruspg19:HEAD [20:30:42] restarting db (C)...
uruspg19:HEAD [20:30:47] running make test-modules installcheck (C)...
uruspg19:HEAD [20:36:44] stopping db (C)...
uruspg19:HEAD [20:36:46] running make ecpg check ...
uruspg19:HEAD [20:37:19] OK
Branch: HEAD
All stages succeeded
Attachments:
[application/octet-stream] 0001-Changes-to-add-support-for-AIX.v9.pg19.patch (15.7K, 3-0001-Changes-to-add-support-for-AIX.v9.pg19.patch)
download | inline diff:
From 407b42b1fbe562dff69820f7456dbb32a8a37d79 Mon Sep 17 00:00:00 2001
From: AIX-dev <[email protected]>
Date: Tue, 16 Sep 2025 08:59:22 -0500
Subject: [PATCH] Changes to add support for AIX.
---
Makefile | 2 -
configure | 37 +++++++++++++++---
configure.ac | 29 +++++++++++++-
src/Makefile.shlib | 29 ++++++++++++++
src/backend/Makefile | 20 ++++++++++
src/backend/port/aix/mkldexport.sh | 61 ++++++++++++++++++++++++++++++
src/backend/utils/error/elog.c | 2 +
src/include/port/aix.h | 4 ++
src/include/storage/s_lock.h | 48 +++--------------------
src/makefiles/Makefile.aix | 34 +++++++++++++++++
src/port/strerror.c | 2 +
src/template/aix | 7 ++++
12 files changed, 223 insertions(+), 52 deletions(-)
create mode 100755 src/backend/port/aix/mkldexport.sh
create mode 100644 src/include/port/aix.h
create mode 100644 src/makefiles/Makefile.aix
create mode 100644 src/template/aix
diff --git a/Makefile b/Makefile
index 8a2ec9396b6..9bc1a4ec17b 100644
--- a/Makefile
+++ b/Makefile
@@ -13,8 +13,6 @@
# AIX make defaults to building *every* target of the first rule. Start with
# a single-target, empty rule to make the other targets non-default.
-# (We don't support AIX anymore, but if someone tries to build on AIX anyway,
-# at least they'll get the instructions to run 'configure' first.)
all:
all check install installdirs installcheck installcheck-parallel uninstall clean distclean maintainer-clean dist distcheck world check-world install-world installcheck-world:
diff --git a/configure b/configure
index 507a2437c33..67cad0f5581 100755
--- a/configure
+++ b/configure
@@ -3022,6 +3022,7 @@ else
# --with-template not given
case $host_os in
+ aix*) template=aix ;;
cygwin*|msys*) template=cygwin ;;
darwin*) template=darwin ;;
dragonfly*) template=netbsd ;;
@@ -17204,13 +17205,37 @@ _ACEOF
# wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too
# much of a penalty for disk and memory space.
-MAX_ALIGNOF=$ac_cv_alignof_double
+echo "Checking for MAX ALIGN - $PORTNAME"
+if test "$PORTNAME" != "aix"; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
-if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
- as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
-fi
-if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF ; then
- as_fn_error $? "alignment of 'int64_t' is greater than the alignment of 'double'" "$LINENO" 5
+ if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
+ as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
+ fi
+ if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $ac_cv_alignof_long_long_int -gt $MAX_ALIGNOF ; then
+ as_fn_error $? "alignment of 'long long int' is greater than the alignment of 'double'" "$LINENO" 5
+ fi
+else
+# The AIX 'power' alignment rules apply the natural alignment of the "first
+# member" if it is of a floating-point data type (or is an aggregate whose
+# recursively "first" member or element is such a type). The alignment
+# associated with these types for subsequent members use an alignment value
+# where the floating-point data type is considered to have 4-byte alignment.
+# More info
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99557
+#
+# The double is aligned to 4-bytes on AIX in aggregates. But to maintain
+# alignement across platforms the max alignment of long should be considered.
+ echo "MAX ALIGN ac_cv_alignof_long"
+ MAX_ALIGNOF=$ac_cv_alignof_long
+ if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
+ echo "MAX ALIGN ac_cv_alignof_double"
+ fi
+ if test $MAX_ALIGNOF -lt $ac_cv_alignof_int64_t; then
+ MAX_ALIGNOF="$ac_cv_alignof_int64_t"
+ echo "MAX ALIGN ac_cv_alignof_int64_t"
+ fi
fi
cat >>confdefs.h <<_ACEOF
diff --git a/configure.ac b/configure.ac
index 5f4548adc5c..a25aedacef2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,6 +62,7 @@ PGAC_ARG_REQ(with, template, [NAME], [override operating system template],
# --with-template not given
case $host_os in
+ aix*) template=aix ;;
cygwin*|msys*) template=cygwin ;;
darwin*) template=darwin ;;
dragonfly*) template=netbsd ;;
@@ -2021,7 +2022,33 @@ AC_CHECK_ALIGNOF(double)
# wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too
# much of a penalty for disk and memory space.
-MAX_ALIGNOF=$ac_cv_alignof_double
+if test "$PORTNAME" != "aix"; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
+
+ if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
+ as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
+ fi
+ if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF; then
+ as_fn_error $? "alignment of 'long long int' is greater than the alignment of 'double'" "$LINENO" 5
+ fi
+else
+# The AIX 'power' alignment rules apply the natural alignment of the "first
+# member" if it is of a floating-point data type (or is an aggregate whose
+# recursively "first" member or element is such a type). The alignment
+# associated with these types for subsequent members use an alignment value
+# where the floating-point data type is considered to have 4-byte alignment.
+# More info
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99557
+#
+# The double is aligned to 4-bytes on AIX in aggregates. But to maintain
+# alignement across platforms the max alignment of long should be considered.
+ MAX_ALIGNOF=$ac_cv_alignof_long
+ if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
+ fi
+ if test $MAX_ALIGNOF -lt $ac_cv_alignof_int64_t ; then
+ MAX_ALIGNOF="$ac_cv_alignof_int64_t"
+ fi
if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
AC_MSG_ERROR([alignment of 'long' is greater than the alignment of 'double'])
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 3825af5b228..35adc4174ed 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -106,6 +106,20 @@ ifdef SO_MAJOR_VERSION
override CPPFLAGS += -DSO_MAJOR_VERSION=$(SO_MAJOR_VERSION)
endif
+ifeq ($(PORTNAME), aix)
+ LINK.shared = $(COMPILER)
+ ifdef SO_MAJOR_VERSION
+ shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
+ endif
+ haslibarule = yes
+ # $(exports_file) is also usable as an import file
+ exports_file = lib$(NAME).exp
+ BUILD.exports = ( echo '\#! $(shlib)'; $(AWK) '/^[^\#]/ {printf "%s\n",$$1}' $< ) > $@
+ ifneq (,$(SHLIB_EXPORTS))
+ LINK.shared += -Wl,-bE:$(exports_file)
+ endif
+endif
+
ifeq ($(PORTNAME), darwin)
ifdef soname
# linkable library
@@ -254,6 +268,14 @@ $(stlib): $(OBJS) | $(SHLIB_PREREQS)
touch $@
endif #haslibarule
+# AIX wraps both shared libraries and static library, which can be used both
+# for static and shared linking
+ifeq ($(PORTNAME), aix)
+$(stlib): $(shlib)
+ rm -f $(stlib)
+ $(AR) $(AROPT) $(stlib) $(shlib)
+endif # aix
+
ifeq (,$(filter cygwin win32,$(PORTNAME)))
# Normal case
@@ -267,8 +289,11 @@ ifneq ($(shlib), $(shlib_major))
endif
# Make sure we have a link to a name without any version numbers
ifneq ($(shlib), $(shlib_bare))
+# except on AIX, where that's not a thing
+ifneq ($(PORTNAME), aix)
rm -f $(shlib_bare)
$(LN_S) $(shlib) $(shlib_bare)
+endif # aix
endif # shlib_bare
endif # shlib_major
@@ -376,6 +401,9 @@ install-lib-static: $(stlib) installdirs-lib
install-lib-shared: $(shlib) installdirs-lib
ifdef soname
+# we don't install $(shlib) on AIX
+# (see http://archives.postgresql.org/message-id/52EF20B2E3209443BC37736D00C3C1380A6E79FE@EXADV1.host.magwien.gv.at)
+ifneq ($(PORTNAME), aix)
$(INSTALL_SHLIB) $< '$(DESTDIR)$(libdir)/$(shlib)'
ifneq ($(PORTNAME), cygwin)
ifneq ($(PORTNAME), win32)
@@ -391,6 +419,7 @@ ifneq ($(shlib), $(shlib_bare))
endif
endif # not win32
endif # not cygwin
+endif # not aix
ifneq (,$(findstring $(PORTNAME),win32 cygwin))
$(INSTALL_SHLIB) $< '$(DESTDIR)$(bindir)/$(shlib)'
endif
diff --git a/src/backend/Makefile b/src/backend/Makefile
index 7344c8c7f5c..572f5430a60 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -63,12 +63,14 @@ all: submake-libpgport submake-catalog-headers submake-utils-headers postgres $(
ifneq ($(PORTNAME), cygwin)
ifneq ($(PORTNAME), win32)
+ifneq ($(PORTNAME), aix)
postgres: $(OBJS)
$(CC) $(CFLAGS) $(call expand_subsys,$^) $(LDFLAGS) $(LIBS) -o $@
endif
endif
+endif
ifeq ($(PORTNAME), cygwin)
@@ -95,6 +97,24 @@ libpostgres.a: postgres
endif # win32
+ifeq ($(PORTNAME), aix)
+
+postgres: $(POSTGRES_IMP)
+ $(CC) $(CFLAGS) $(call expand_subsys,$(OBJS)) $(LDFLAGS) -Wl,-bE:$(top_builddir)/src/backend/$(POSTGRES_IMP) $(LIBS) -Wl,-brtllib -o $@
+
+# Linking to a single .o with -r is a lot faster than building a .a or passing
+# all objects to MKLDEXPORT.
+#
+# It looks alluring to use $(CC) -r instead of ld -r, but that doesn't
+# trivially work with gcc, due to gcc specific static libraries linked in with
+# -r.
+$(POSTGRES_IMP): $(OBJS)
+ ld -r -o SUBSYS.o $(call expand_subsys,$^)
+ $(MKLDEXPORT) SUBSYS.o . > $@
+ @rm -f SUBSYS.o
+
+endif # aix
+
$(top_builddir)/src/port/libpgport_srv.a: | submake-libpgport
diff --git a/src/backend/port/aix/mkldexport.sh b/src/backend/port/aix/mkldexport.sh
new file mode 100755
index 00000000000..adf3793e868
--- /dev/null
+++ b/src/backend/port/aix/mkldexport.sh
@@ -0,0 +1,61 @@
+#!/bin/sh
+#
+# mkldexport
+# create an AIX exports file from an object file
+#
+# src/backend/port/aix/mkldexport.sh
+#
+# Usage:
+# mkldexport objectfile [location]
+# where
+# objectfile is the current location of the object file.
+# location is the eventual (installed) location of the
+# object file (if different from the current
+# working directory).
+#
+# [This file comes from the Postgres 4.2 distribution. - ay 7/95]
+#
+# Header: /usr/local/devel/postgres/src/tools/mkldexport/RCS/mkldexport.sh,v 1.2 1994/03/13 04:59:12 aoki Exp
+#
+
+# setting this to nm -B might be better
+# ... due to changes in AIX 4.x ...
+# ... let us search in different directories - Gerhard Reithofer
+if [ -x /usr/ucb/nm ]
+then NM=/usr/ucb/nm
+elif [ -x /usr/bin/nm ]
+then NM=/usr/bin/nm
+elif [ -x /usr/ccs/bin/nm ]
+then NM=/usr/ccs/bin/nm
+elif [ -x /usr/usg/bin/nm ]
+then NM=/usr/usg/bin/nm
+else echo "Fatal error: cannot find `nm' ... please check your installation."
+ exit 1
+fi
+
+CMDNAME=`basename $0`
+if [ -z "$1" ]; then
+ echo "Usage: $CMDNAME object [location]"
+ exit 1
+fi
+OBJNAME=`basename $1`
+if [ "`basename $OBJNAME`" != "`basename $OBJNAME .o`" ]; then
+ OBJNAME=`basename $OBJNAME .o`.so
+fi
+if [ -z "$2" ]; then
+ echo '#!'
+else
+ if [ "$2" = "." ]; then
+ # for the base executable (AIX 4.2 and up)
+ echo '#! .'
+ else
+ echo '#!' $2
+ fi
+fi
+$NM -BCg $1 | \
+ egrep ' [TDB] ' | \
+ sed -e 's/.* //' | \
+ egrep -v '\$' | \
+ sed -e 's/^[.]//' | \
+ sort | \
+ uniq
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index b7b9692f8c8..d0c4b7ba3ac 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -905,7 +905,9 @@ errcode_for_file_access(void)
/* Wrong object type or state */
case ENOTDIR: /* Not a directory */
case EISDIR: /* Is a directory */
+#if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */
case ENOTEMPTY: /* Directory not empty */
+#endif
edata->sqlerrcode = ERRCODE_WRONG_OBJECT_TYPE;
break;
diff --git a/src/include/port/aix.h b/src/include/port/aix.h
new file mode 100644
index 00000000000..7d08480c8c0
--- /dev/null
+++ b/src/include/port/aix.h
@@ -0,0 +1,4 @@
+/*
+ * src/include/port/aix.h
+ */
+
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index 2f73f9fcf57..ba120c08d14 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -398,56 +398,18 @@ typedef unsigned int slock_t;
#define TAS(lock) tas(lock)
-/* On PPC, it's a win to use a non-locking test before the lwarx */
+/* On PPC, use the compiler provided Built-in functions for atomic memory
+ * exchange operations.
+ */
#define TAS_SPIN(lock) (*(lock) ? 1 : TAS(lock))
-/*
- * The second operand of addi can hold a constant zero or a register number,
- * hence constraint "=&b" to avoid allocating r0. "b" stands for "address
- * base register"; most operands having this register-or-zero property are
- * address bases, e.g. the second operand of lwax.
- *
- * NOTE: per the Enhanced PowerPC Architecture manual, v1.0 dated 7-May-2002,
- * an isync is a sufficient synchronization barrier after a lwarx/stwcx loop.
- * But if the spinlock is in ordinary memory, we can use lwsync instead for
- * better performance.
- */
static __inline__ int
tas(volatile slock_t *lock)
{
- slock_t _t;
- int _res;
-
- __asm__ __volatile__(
-" lwarx %0,0,%3,1 \n"
-" cmpwi %0,0 \n"
-" bne 1f \n"
-" addi %0,%0,1 \n"
-" stwcx. %0,0,%3 \n"
-" beq 2f \n"
-"1: \n"
-" li %1,1 \n"
-" b 3f \n"
-"2: \n"
-" lwsync \n"
-" li %1,0 \n"
-"3: \n"
-: "=&b"(_t), "=r"(_res), "+m"(*lock)
-: "r"(lock)
-: "memory", "cc");
- return _res;
+ return __sync_lock_test_and_set(lock, 1);
}
-/*
- * PowerPC S_UNLOCK is almost standard but requires a "sync" instruction.
- * But we can use lwsync instead for better performance.
- */
-#define S_UNLOCK(lock) \
-do \
-{ \
- __asm__ __volatile__ (" lwsync \n" ::: "memory"); \
- *((volatile slock_t *) (lock)) = 0; \
-} while (0)
+#define S_UNLOCK(lock) __sync_lock_release(lock)
#endif /* powerpc */
diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix
new file mode 100644
index 00000000000..4c4de8b0be7
--- /dev/null
+++ b/src/makefiles/Makefile.aix
@@ -0,0 +1,34 @@
+# -blibpath:
+# The path to be inserted into the default path (Index 0 path) field of the
+# loader section. When this flag is presented, the -L paths will not be stored.
+# AIX uses a stricter, more explicit approach. The runtime linker expects to
+# tell it exactly where to look using -blibpath.
+# -blibpath must contain ALL directories where we should look for libraries
+libpath := $(shell echo $(subst -L,:,$(filter -L/%,$(LDFLAGS))) | sed -e's/ //g'):/usr/lib:/lib
+
+# AIX uses a stricter, more explicit approach. The runtime linker expects
+# to tell it exactly where to look using -blibpath.
+rpath = -Wl,-blibpath:'$(rpathdir)$(libpath)'
+
+# gcc needs to know it's building a shared lib, otherwise it'll not emit
+# correct code / link to the right support libraries
+ifeq ($(GCC), yes)
+LDFLAGS_SL += -shared
+endif
+
+# env var name to use in place of LD_LIBRARY_PATH
+ld_library_path_var = LIBPATH
+
+POSTGRES_IMP= postgres.imp
+
+ifdef PGXS
+BE_DLLLIBS= -Wl,-bI:$(pkglibdir)/$(POSTGRES_IMP)
+else
+BE_DLLLIBS= -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP)
+endif
+
+MKLDEXPORT_DIR=src/backend/port/aix
+MKLDEXPORT=$(top_srcdir)/$(MKLDEXPORT_DIR)/mkldexport.sh
+
+%$(DLSUFFIX): %.o
+ $(CC) $(CFLAGS) $*.o $(LDFLAGS) $(LDFLAGS_SL) -o $@ $(BE_DLLLIBS)
diff --git a/src/port/strerror.c b/src/port/strerror.c
index f0746517770..c46b9dc91fc 100644
--- a/src/port/strerror.c
+++ b/src/port/strerror.c
@@ -214,8 +214,10 @@ get_errno_symbol(int errnum)
return "ENOTCONN";
case ENOTDIR:
return "ENOTDIR";
+#if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */
case ENOTEMPTY:
return "ENOTEMPTY";
+#endif
case ENOTSOCK:
return "ENOTSOCK";
#ifdef ENOTSUP
diff --git a/src/template/aix b/src/template/aix
new file mode 100644
index 00000000000..bfc193348f4
--- /dev/null
+++ b/src/template/aix
@@ -0,0 +1,7 @@
+# This file is referred for specific flags wrt to AIX build process like
+# cflags.
+# src/template/aix
+
+# Extra CFLAGS for code that will go into a shared library
+# With optimization, the MemSet() and MemSetAlign() perform better.
+CFLAGS_SL=" -O2 "
--
2.41.0
[text/plain] bfarm.19.log (5.3K, 4-bfarm.19.log)
download | inline:
Mon Sep 15 18:56:20 2025: buildfarm run for uruspg19:HEAD starting
branch not specified, locks, logs, build artefacts etc will go in HEAD
uruspg19:HEAD [18:59:44] running configure ...
uruspg19:HEAD [19:01:04] running build ...
uruspg19:HEAD [19:01:52] running basic regression tests ...
uruspg19:HEAD [19:10:10] running make contrib ...
uruspg19:HEAD [19:10:11] running make testmodules ...
uruspg19:HEAD [19:10:12] running install ...
uruspg19:HEAD [19:10:56] running make contrib install ...
uruspg19:HEAD [19:11:12] running testmodules install ...
uruspg19:HEAD [19:11:19] running make check miscellaneous modules ...
uruspg19:HEAD [19:13:31] running bin test initdb ...
uruspg19:HEAD [19:13:57] running bin test pg_amcheck ...
uruspg19:HEAD [19:14:23] running bin test pg_archivecleanup ...
uruspg19:HEAD [19:14:24] running bin test pg_basebackup ...
uruspg19:HEAD [19:15:38] running bin test pg_checksums ...
uruspg19:HEAD [19:15:45] running bin test pg_combinebackup ...
uruspg19:HEAD [19:17:10] running bin test pg_config ...
uruspg19:HEAD [19:17:10] running bin test pg_controldata ...
uruspg19:HEAD [19:17:13] running bin test pg_ctl ...
uruspg19:HEAD [19:17:31] running bin test pg_dump ...
uruspg19:HEAD [19:20:40] running bin test pg_resetwal ...
uruspg19:HEAD [19:20:46] running bin test pg_rewind ...
uruspg19:HEAD [19:22:25] running bin test pg_test_fsync ...
uruspg19:HEAD [19:22:26] running bin test pg_test_timing ...
uruspg19:HEAD [19:22:28] running bin test pg_upgrade ...
uruspg19:HEAD [19:33:01] running bin test pg_verifybackup ...
uruspg19:HEAD [19:34:38] running bin test pg_waldump ...
uruspg19:HEAD [19:34:49] running bin test pg_walsummary ...
uruspg19:HEAD [19:34:54] running bin test pgbench ...
uruspg19:HEAD [19:35:25] running bin test psql ...
uruspg19:HEAD [19:35:34] running bin test scripts ...
uruspg19:HEAD [19:36:55] running test misc-recovery ...
uruspg19:HEAD [19:57:56] running test misc-subscription ...
uruspg19:HEAD [20:05:06] running test misc-authentication ...
uruspg19:HEAD [20:05:30] running misc test module-brin ...
uruspg19:HEAD [20:05:44] running misc test module-commit_ts ...
uruspg19:HEAD [20:06:10] running misc test module-injection_points ...
uruspg19:HEAD [20:06:10] running misc test module-ldap_password_func ...
uruspg19:HEAD [20:06:11] running misc test module-libpq_pipeline ...
uruspg19:HEAD [20:06:15] running misc test module-oauth_validator ...
uruspg19:HEAD [20:06:16] running misc test module-ssl_passphrase_callback ...
uruspg19:HEAD [20:06:19] running misc test module-test_aio ...
uruspg19:HEAD [20:06:34] running misc test module-test_custom_rmgrs ...
uruspg19:HEAD [20:06:37] running misc test module-test_escape ...
uruspg19:HEAD [20:06:41] running misc test module-test_extensions ...
uruspg19:HEAD [20:06:48] running misc test module-test_int128 ...
uruspg19:HEAD [20:06:49] running misc test module-test_json_parser ...
uruspg19:HEAD [20:07:19] running misc test module-test_misc ...
uruspg19:HEAD [20:07:34] running misc test module-test_pg_dump ...
uruspg19:HEAD [20:07:56] running misc test module-test_slru ...
uruspg19:HEAD [20:07:59] running misc test module-worker_spi ...
uruspg19:HEAD [20:08:05] running misc test module-xid_wraparound ...
uruspg19:HEAD [20:08:06] running misc test module-libpq ...
uruspg19:HEAD [20:08:25] running misc test module-pg_bsd_indent ...
uruspg19:HEAD [20:08:29] running contrib test amcheck ...
uruspg19:HEAD [20:09:09] running contrib test auto_explain ...
uruspg19:HEAD [20:09:16] running contrib test basebackup_to_shell ...
uruspg19:HEAD [20:09:23] running contrib test bloom ...
uruspg19:HEAD [20:09:48] running contrib test oid2name ...
uruspg19:HEAD [20:09:49] running contrib test pg_stat_statements ...
uruspg19:HEAD [20:10:03] running contrib test postgres_fdw ...
Use of uninitialized value $ENV{"PG_TEST_EXTRA"} in pattern match (m//) at ./run_build.pl line 2510.
uruspg19:HEAD [20:10:24] running contrib test test_decoding ...
uruspg19:HEAD [20:10:47] running contrib test vacuumlo ...
uruspg19:HEAD [20:10:48] setting up db cluster (C)...
uruspg19:HEAD [20:10:50] starting db (C)...
uruspg19:HEAD [20:10:50] running installcheck (C)...
uruspg19:HEAD [20:19:31] restarting db (C)...
uruspg19:HEAD [20:19:34] running make isolation check ...
uruspg19:HEAD [20:22:11] restarting db (C)...
uruspg19:HEAD [20:22:18] running make PL installcheck (C)...
uruspg19:HEAD [20:22:24] restarting db (C)...
uruspg19:HEAD [20:22:26] running make contrib installcheck (C)...
uruspg19:HEAD [20:30:42] restarting db (C)...
uruspg19:HEAD [20:30:47] running make test-modules installcheck (C)...
uruspg19:HEAD [20:36:44] stopping db (C)...
uruspg19:HEAD [20:36:46] running make ecpg check ...
uruspg19:HEAD [20:37:19] OK
Branch: HEAD
All stages succeeded
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-09-18 06:21 Vamshikrishna T <[email protected]>
parent: Srirama Kucherlapati <[email protected]>
0 siblings, 0 replies; 29+ messages in thread
From: Vamshikrishna T @ 2025-09-18 06:21 UTC (permalink / raw)
To: [email protected]; +Cc: AIX PG user <[email protected]>
This patch marked 10/10 with all CI checks passing. Your feedback on the patch would be greatly appreciated.
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-09-20 15:20 Alvaro Herrera <[email protected]>
parent: Srirama Kucherlapati <[email protected]>
1 sibling, 1 reply; 29+ messages in thread
From: Alvaro Herrera @ 2025-09-20 15:20 UTC (permalink / raw)
To: Srirama Kucherlapati <[email protected]>; +Cc: Heikki Linnakangas <[email protected]>; pgsql-hackers; Robert Haas <[email protected]>; Bruce Momjian <[email protected]>; Peter Eisentraut <[email protected]>; Laurenz Albe <[email protected]>; Noah Misch <[email protected]>; Michael Paquier <[email protected]>; Andres Freund <[email protected]>; Thomas Munro <[email protected]>; [email protected] <[email protected]>; Tom Lane <[email protected]>; Tristan Partin <[email protected]>; wenhui qiu <[email protected]>; [email protected] <[email protected]>
On 2025-Sep-03, Srirama Kucherlapati wrote:
> As part of our ongoing efforts to enhance AIX platform compatibility,
> we’ve been running the code across all stable PostgreSQL release
> branches using the build farm infrastructure. All test suites,
> including TAP tests, are passing consistently, indicating no
> regressions.
The buildfarm results you sent look good. You should definitely be
testing branch master though rather than the stable ones, because it's
not clear to me, as Bruce said, that we would really backpatch AIX
support to stable branches. (You're of course free to produce your own
packages from patched versions, in the interim).
I noticed that you add mkldexport.sh and that the makefiles use it. I
wonder if that really is necessary with the current AIX tooling (it
looks an outdated gadget).
Also, I notice that Meson supports AIX starting from version 0.56; did
you verify whether it works to build this with that?
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-09-22 11:09 AIX PG user <[email protected]>
parent: Alvaro Herrera <[email protected]>
0 siblings, 1 reply; 29+ messages in thread
From: AIX PG user @ 2025-09-22 11:09 UTC (permalink / raw)
To: [email protected]; +Cc: AIX PG user <[email protected]>
Hi Alvaro,
Thank you for taking your time to look into the details.
I’ve submitted the latest changes to the master branch, which are now available in the annotations section here:
https://commitfest.postgresql.org/patch/6050/
I kindly request you to review this updated patch and share your valuable feedback.
Regarding your observation about the inclusion of mkldexport.sh and its usage in the makefiles — as previously
discussed, this is a necessary workaround due to current limitations on AIX. To build shared libraries, we need to
extract symbols using this script. The relevant details are as follows:
Script Location: src/backend/port/aix/mkldexport.sh
Purpose: Implements AIX-specific changes for shared library creation using export files.
Background: Based on discussions with the internal linker team, this method is currently required to extract symbols and build shared libraries.
Reference Practices: This approach is consistent with methods used in other open-source projects such as Python and OpenBLAS:
Python
https://github.com/python/cpython/blob/main/Modules/ld_so_aix.in
OpenBLAS
https://github.com/OpenMathLib/OpenBLAS/commit/892f8ff3e55e24fda9af3f6364319cce3f60116b#diff-4011a11...
As for Meson builds, we did explore them earlier but encountered some issues. Here are some issues/fixes we submitted to the meson community
https://github.com/mesonbuild/meson/issues/14334
For now, we would like to focus initially on the regular gmake build since our buildfarms predominantly use it. That said, we do plan to submit Meson-related changes as a separate patch in the future.
Looking forward to your feedback.
-Sriram
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-09-22 12:27 Andres Freund <[email protected]>
parent: AIX PG user <[email protected]>
0 siblings, 1 reply; 29+ messages in thread
From: Andres Freund @ 2025-09-22 12:27 UTC (permalink / raw)
To: AIX PG user <[email protected]>; +Cc: [email protected]
Hi,
On 2025-09-22 11:09:53 +0000, AIX PG user wrote:
> As for Meson builds, we did explore them earlier but encountered some
> issues. Here are some issues/fixes we submitted to the meson community
> https://github.com/mesonbuild/meson/issues/14334 For now, we would like to
> focus initially on the regular gmake build since our buildfarms
> predominantly use it. That said, we do plan to submit Meson-related changes
> as a separate patch in the future.
I think we should do the opposite if anything. We're planning to eventually
remove make based builds.
But I'm also suprprised - before the removal meson based builds on AIX were
working. Why didn't you just revive it as it was?
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-09-23 14:26 AIX PG user <[email protected]>
parent: Andres Freund <[email protected]>
0 siblings, 1 reply; 29+ messages in thread
From: AIX PG user @ 2025-09-23 14:26 UTC (permalink / raw)
To: [email protected]; +Cc: AIX PG user <[email protected]>
Hi Andres,
Thank you for your feedback and for highlighting the importance of Meson-based builds.
We fully recognize the long-term objective of transitioning away from
make-based builds, and we are actively working on reviving Meson support for
AIX in alignment with that direction. However, we are currently encountering a
few errors with the revived changes, and we are working actively to
resolve them. I will keep you updated and share the finalized Meson-related
changes at the earliest opportunity.
In the meantime, we would sincerely appreciate it if you/team could review the patch
with respect to the gmake build and the associated source-level modifications
submitted on commitfest.
https://commitfest.postgresql.org/patch/6050/
Your input would be invaluable in helping us ensure the correctness and
completeness of the implementation before we proceed further. Thank you once
again for your continued guidance and support.
Warm regards,
Sriram.
^ permalink raw reply [nested|flat] 29+ messages in thread
* Re: AIX support
@ 2025-09-23 14:36 Andres Freund <[email protected]>
parent: AIX PG user <[email protected]>
0 siblings, 1 reply; 29+ messages in thread
From: Andres Freund @ 2025-09-23 14:36 UTC (permalink / raw)
To: AIX PG user <[email protected]>; +Cc: [email protected]
Hi,
On 2025-09-23 14:26:08 +0000, AIX PG user wrote:
> Thank you for your feedback and for highlighting the importance of Meson-based builds.
>
> We fully recognize the long-term objective of transitioning away from
> make-based builds, and we are actively working on reviving Meson support for
> AIX in alignment with that direction. However, we are currently encountering a
> few errors with the revived changes, and we are working actively to
> resolve them. I will keep you updated and share the finalized Meson-related
> changes at the earliest opportunity.
It worked without meson changes just before the AIX support was dropped. I do
not see why you *need* that meson patch, rather it just being convenient -
after all I had made it work before, without that.
> In the meantime, we would sincerely appreciate it if you/team could review the patch
> with respect to the gmake build and the associated source-level modifications
> submitted on commitfest.
I'd personally just not add gmake support at all, but ...
> https://commitfest.postgresql.org/patch/6050/
>
> Your input would be invaluable in helping us ensure the correctness and
> completeness of the implementation before we proceed further. Thank you once
> again for your continued guidance and support.
One suggestion I do have is to split the patch into a few constitutent pieces.
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 29+ messages in thread
* RE: AIX support
@ 2025-09-23 15:28 Srirama Kucherlapati <[email protected]>
parent: Andres Freund <[email protected]>
0 siblings, 0 replies; 29+ messages in thread
From: Srirama Kucherlapati @ 2025-09-23 15:28 UTC (permalink / raw)
To: Andres Freund <[email protected]>; AIX PG user <[email protected]>; +Cc: [email protected] <[email protected]>
Hi Andres,
> It worked without meson changes just before the AIX support was dropped. I do
> not see why you *need* that meson patch, rather it just being convenient -
> after all I had made it work before, without that.
I was able to build successfully using Meson on PostgreSQL 16. However, when attempting the same on the latest master(with the revived changes), I encountered a few errors. We are currently investigating these issues and working on the necessary fixes.
I’ll keep you updated once the Meson-related fixes are ready.
> One suggestion I do have is to split the patch into a few constitutent pieces.
Thank you for the suggestion.
Splitting the patch into smaller, constituent pieces makes sense and would certainly help with clarity and review.
Appreciate your guidance.
Warm regards,
Sriram.
^ permalink raw reply [nested|flat] 29+ messages in thread
end of thread, other threads:[~2025-09-23 15:28 UTC | newest]
Thread overview: 29+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-02-07 16:50 RE: AIX support Srirama Kucherlapati <[email protected]>
2025-03-07 14:11 ` Srirama Kucherlapati <[email protected]>
2025-03-07 16:20 ` Robert Haas <[email protected]>
2025-03-17 16:58 ` Srirama Kucherlapati <[email protected]>
2025-04-03 08:25 ` wenhui qiu <[email protected]>
2025-04-03 13:45 ` Srirama Kucherlapati <[email protected]>
2025-04-03 13:49 ` Heikki Linnakangas <[email protected]>
2025-04-04 19:31 ` Srirama Kucherlapati <[email protected]>
2025-04-04 20:44 ` Heikki Linnakangas <[email protected]>
2025-04-05 18:29 ` Srirama Kucherlapati <[email protected]>
2025-04-07 10:04 ` Heikki Linnakangas <[email protected]>
2025-04-12 16:41 ` Srirama Kucherlapati <[email protected]>
2025-04-12 17:09 ` Srirama Kucherlapati <[email protected]>
2025-04-15 16:20 ` Srirama Kucherlapati <[email protected]>
2025-09-03 16:44 ` Srirama Kucherlapati <[email protected]>
2025-09-11 05:20 ` Vamshikrishna T <[email protected]>
2025-09-11 06:12 ` Laurenz Albe <[email protected]>
2025-09-11 10:48 ` Vamshikrishna T <[email protected]>
2025-09-15 23:44 ` Bruce Momjian <[email protected]>
2025-09-16 15:13 ` Srirama Kucherlapati <[email protected]>
2025-09-18 06:21 ` Vamshikrishna T <[email protected]>
2025-09-20 15:20 ` Alvaro Herrera <[email protected]>
2025-09-22 11:09 ` AIX PG user <[email protected]>
2025-09-22 12:27 ` Andres Freund <[email protected]>
2025-09-23 14:26 ` AIX PG user <[email protected]>
2025-09-23 14:36 ` Andres Freund <[email protected]>
2025-09-23 15:28 ` Srirama Kucherlapati <[email protected]>
2025-04-25 01:31 ` Thomas Munro <[email protected]>
2025-04-03 13:54 ` Andres Freund <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox