Skip to content

Commit ce2a5c3

Browse files
authored
Merge pull request IvorySQL#712 from jiaoshuntian/merge_pg_master3
Merge pg master to 2024.7.1
2 parents 05961c0 + 495d6d6 commit ce2a5c3

1,390 files changed

Lines changed: 238525 additions & 131320 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cirrus.tasks.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ env:
2020
MTEST_ARGS: --print-errorlogs --no-rebuild -C build
2121
PGCTLTIMEOUT: 120 # avoids spurious failures during parallel tests
2222
TEMP_CONFIG: ${CIRRUS_WORKING_DIR}/src/tools/ci/pg_ci_base.conf
23-
PG_TEST_EXTRA: kerberos ldap ssl load_balance
23+
PG_TEST_EXTRA: kerberos ldap ssl libpq_encryption load_balance
2424

2525

2626
# What files to preserve in case tests fail
@@ -520,6 +520,7 @@ WINDOWS_ENVIRONMENT_BASE: &WINDOWS_ENVIRONMENT_BASE
520520
PG_TEST_USE_UNIX_SOCKETS: 1
521521
PG_REGRESS_SOCK_DIR: "c:/cirrus/"
522522
DISK_SIZE: 50
523+
IMAGE_FAMILY: pg-ci-windows-ci
523524

524525
sysinfo_script: |
525526
chcp
@@ -543,7 +544,6 @@ task:
543544
# given that it explicitly prevents crash dumps from working...
544545
# 0x8001 is SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX
545546
CIRRUS_WINDOWS_ERROR_MODE: 0x8001
546-
IMAGE_FAMILY: pg-ci-windows-ci-vs-2019
547547

548548
<<: *windows_task_template
549549

@@ -604,7 +604,6 @@ task:
604604
# Start bash in current working directory
605605
CHERE_INVOKING: 1
606606
BASH: C:\msys64\usr\bin\bash.exe -l
607-
IMAGE_FAMILY: pg-ci-windows-ci-mingw64
608607

609608
<<: *windows_task_template
610609

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
#
1515
# $ git log --pretty=format:"%H # %cd%n# %s" $PGINDENTGITHASH -1 --date=iso
1616

17+
da256a4a7fdcca35fe7ca808686ad3de6ee22306 # 2024-05-14 16:34:50 -0400
18+
# Pre-beta mechanical code beautification.
19+
1720
64e401b62b1559d617db5c1e1070d7a05e794c27 # 2024-03-25 14:18:33 +0100
1821
# Fix indentation from a11f330b5
1922

GNUmakefile.in

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ update-unicode: | submake-generated-headers submake-libpgport
111111
distdir = postgresql-$(VERSION)
112112
dummy = =install=
113113

114+
# git revision to be packaged
115+
PG_GIT_REVISION = HEAD
116+
114117
GIT = git
115118

116119
dist: $(distdir).tar.gz $(distdir).tar.bz2
@@ -126,10 +129,10 @@ distdir-location:
126129
# on, Unix machines.
127130

128131
$(distdir).tar.gz:
129-
$(GIT) -C $(srcdir) -c core.autocrlf=false archive --format tar.gz -9 --prefix $(distdir)/ HEAD -o $(abs_top_builddir)/$@
132+
$(GIT) -C $(srcdir) -c core.autocrlf=false archive --format tar.gz -9 --prefix $(distdir)/ $(PG_GIT_REVISION) -o $(abs_top_builddir)/$@
130133

131134
$(distdir).tar.bz2:
132-
$(GIT) -C $(srcdir) -c core.autocrlf=false -c tar.tar.bz2.command='$(BZIP2) -c' archive --format tar.bz2 --prefix $(distdir)/ HEAD -o $(abs_top_builddir)/$@
135+
$(GIT) -C $(srcdir) -c core.autocrlf=false -c tar.tar.bz2.command='$(BZIP2) -c' archive --format tar.bz2 --prefix $(distdir)/ $(PG_GIT_REVISION) -o $(abs_top_builddir)/$@
133136

134137
distcheck: dist
135138
rm -rf $(dummy)

config/c-compiler.m4

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,3 +694,61 @@ if test x"$Ac_cachevar" = x"yes"; then
694694
fi
695695
undefine([Ac_cachevar])dnl
696696
])# PGAC_LOONGARCH_CRC32C_INTRINSICS
697+
698+
# PGAC_XSAVE_INTRINSICS
699+
# ---------------------
700+
# Check if the compiler supports the XSAVE instructions using the _xgetbv
701+
# intrinsic function.
702+
#
703+
# An optional compiler flag can be passed as argument (e.g., -mxsave). If the
704+
# intrinsic is supported, sets pgac_xsave_intrinsics and CFLAGS_XSAVE.
705+
AC_DEFUN([PGAC_XSAVE_INTRINSICS],
706+
[define([Ac_cachevar], [AS_TR_SH([pgac_cv_xsave_intrinsics_$1])])dnl
707+
AC_CACHE_CHECK([for _xgetbv with CFLAGS=$1], [Ac_cachevar],
708+
[pgac_save_CFLAGS=$CFLAGS
709+
CFLAGS="$pgac_save_CFLAGS $1"
710+
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <immintrin.h>],
711+
[return _xgetbv(0) & 0xe0;])],
712+
[Ac_cachevar=yes],
713+
[Ac_cachevar=no])
714+
CFLAGS="$pgac_save_CFLAGS"])
715+
if test x"$Ac_cachevar" = x"yes"; then
716+
CFLAGS_XSAVE="$1"
717+
pgac_xsave_intrinsics=yes
718+
fi
719+
undefine([Ac_cachevar])dnl
720+
])# PGAC_XSAVE_INTRINSICS
721+
722+
# PGAC_AVX512_POPCNT_INTRINSICS
723+
# -----------------------------
724+
# Check if the compiler supports the AVX-512 popcount instructions using the
725+
# _mm512_setzero_si512, _mm512_maskz_loadu_epi8, _mm512_popcnt_epi64,
726+
# _mm512_add_epi64, and _mm512_reduce_add_epi64 intrinsic functions.
727+
#
728+
# Optional compiler flags can be passed as argument (e.g., -mavx512vpopcntdq
729+
# -mavx512bw). If the intrinsics are supported, sets
730+
# pgac_avx512_popcnt_intrinsics and CFLAGS_POPCNT.
731+
AC_DEFUN([PGAC_AVX512_POPCNT_INTRINSICS],
732+
[define([Ac_cachevar], [AS_TR_SH([pgac_cv_avx512_popcnt_intrinsics_$1])])dnl
733+
AC_CACHE_CHECK([for _mm512_popcnt_epi64 with CFLAGS=$1], [Ac_cachevar],
734+
[pgac_save_CFLAGS=$CFLAGS
735+
CFLAGS="$pgac_save_CFLAGS $1"
736+
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <immintrin.h>],
737+
[const char buf@<:@sizeof(__m512i)@:>@;
738+
PG_INT64_TYPE popcnt = 0;
739+
__m512i accum = _mm512_setzero_si512();
740+
const __m512i val = _mm512_maskz_loadu_epi8((__mmask64) 0xf0f0f0f0f0f0f0f0, (const __m512i *) buf);
741+
const __m512i cnt = _mm512_popcnt_epi64(val);
742+
accum = _mm512_add_epi64(accum, cnt);
743+
popcnt = _mm512_reduce_add_epi64(accum);
744+
/* return computed value, to prevent the above being optimized away */
745+
return popcnt == 0;])],
746+
[Ac_cachevar=yes],
747+
[Ac_cachevar=no])
748+
CFLAGS="$pgac_save_CFLAGS"])
749+
if test x"$Ac_cachevar" = x"yes"; then
750+
CFLAGS_POPCNT="$1"
751+
pgac_avx512_popcnt_intrinsics=yes
752+
fi
753+
undefine([Ac_cachevar])dnl
754+
])# PGAC_AVX512_POPCNT_INTRINSICS

config/config.guess

Lines changed: 50 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#! /bin/sh
22
# Attempt to guess a canonical system name.
3-
# Copyright 1992-2023 Free Software Foundation, Inc.
3+
# Copyright 1992-2024 Free Software Foundation, Inc.
44

55
# shellcheck disable=SC2006,SC2268 # see below for rationale
66

7-
timestamp='2023-01-01'
7+
timestamp='2024-01-01'
88

99
# This file is free software; you can redistribute it and/or modify it
1010
# under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'`
4747
usage="\
4848
Usage: $0 [OPTION]
4949
50-
Output the configuration name of the system \`$me' is run on.
50+
Output the configuration name of the system '$me' is run on.
5151
5252
Options:
5353
-h, --help print this help, then exit
@@ -60,13 +60,13 @@ version="\
6060
GNU config.guess ($timestamp)
6161
6262
Originally written by Per Bothner.
63-
Copyright 1992-2023 Free Software Foundation, Inc.
63+
Copyright 1992-2024 Free Software Foundation, Inc.
6464
6565
This is free software; see the source for copying conditions. There is NO
6666
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
6767

6868
help="
69-
Try \`$me --help' for more information."
69+
Try '$me --help' for more information."
7070

7171
# Parse command line
7272
while test $# -gt 0 ; do
@@ -102,8 +102,8 @@ GUESS=
102102
# temporary files to be created and, as you can see below, it is a
103103
# headache to deal with in a portable fashion.
104104

105-
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
106-
# use `HOST_CC' if defined, but it is deprecated.
105+
# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
106+
# use 'HOST_CC' if defined, but it is deprecated.
107107

108108
# Portable tmp directory creation inspired by the Autoconf team.
109109

@@ -155,20 +155,26 @@ Linux|GNU|GNU/*)
155155

156156
set_cc_for_build
157157
cat <<-EOF > "$dummy.c"
158+
#if defined(__ANDROID__)
159+
LIBC=android
160+
#else
158161
#include <features.h>
159162
#if defined(__UCLIBC__)
160163
LIBC=uclibc
161164
#elif defined(__dietlibc__)
162165
LIBC=dietlibc
163166
#elif defined(__GLIBC__)
164167
LIBC=gnu
168+
#elif defined(__LLVM_LIBC__)
169+
LIBC=llvm
165170
#else
166171
#include <stdarg.h>
167172
/* First heuristic to detect musl libc. */
168173
#ifdef __DEFINED_va_list
169174
LIBC=musl
170175
#endif
171176
#endif
177+
#endif
172178
EOF
173179
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
174180
eval "$cc_set_libc"
@@ -459,7 +465,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
459465
UNAME_RELEASE=`uname -v`
460466
;;
461467
esac
462-
# Japanese Language versions have a version number like `4.1.3-JL'.
468+
# Japanese Language versions have a version number like '4.1.3-JL'.
463469
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
464470
GUESS=sparc-sun-sunos$SUN_REL
465471
;;
@@ -904,7 +910,7 @@ EOF
904910
fi
905911
;;
906912
*:FreeBSD:*:*)
907-
UNAME_PROCESSOR=`/usr/bin/uname -p`
913+
UNAME_PROCESSOR=`uname -p`
908914
case $UNAME_PROCESSOR in
909915
amd64)
910916
UNAME_PROCESSOR=x86_64 ;;
@@ -976,7 +982,27 @@ EOF
976982
GUESS=$UNAME_MACHINE-unknown-minix
977983
;;
978984
aarch64:Linux:*:*)
979-
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
985+
set_cc_for_build
986+
CPU=$UNAME_MACHINE
987+
LIBCABI=$LIBC
988+
if test "$CC_FOR_BUILD" != no_compiler_found; then
989+
ABI=64
990+
sed 's/^ //' << EOF > "$dummy.c"
991+
#ifdef __ARM_EABI__
992+
#ifdef __ARM_PCS_VFP
993+
ABI=eabihf
994+
#else
995+
ABI=eabi
996+
#endif
997+
#endif
998+
EOF
999+
cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
1000+
eval "$cc_set_abi"
1001+
case $ABI in
1002+
eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
1003+
esac
1004+
fi
1005+
GUESS=$CPU-unknown-linux-$LIBCABI
9801006
;;
9811007
aarch64_be:Linux:*:*)
9821008
UNAME_MACHINE=aarch64_be
@@ -1042,6 +1068,15 @@ EOF
10421068
k1om:Linux:*:*)
10431069
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10441070
;;
1071+
kvx:Linux:*:*)
1072+
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1073+
;;
1074+
kvx:cos:*:*)
1075+
GUESS=$UNAME_MACHINE-unknown-cos
1076+
;;
1077+
kvx:mbr:*:*)
1078+
GUESS=$UNAME_MACHINE-unknown-mbr
1079+
;;
10451080
loongarch32:Linux:*:* | loongarch64:Linux:*:*)
10461081
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10471082
;;
@@ -1197,7 +1232,7 @@ EOF
11971232
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
11981233
;;
11991234
i*86:OS/2:*:*)
1200-
# If we were able to find `uname', then EMX Unix compatibility
1235+
# If we were able to find 'uname', then EMX Unix compatibility
12011236
# is probably installed.
12021237
GUESS=$UNAME_MACHINE-pc-os2-emx
12031238
;;
@@ -1338,7 +1373,7 @@ EOF
13381373
GUESS=ns32k-sni-sysv
13391374
fi
13401375
;;
1341-
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1376+
PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
13421377
# says <Richard.M.Bartel@ccMail.Census.GOV>
13431378
GUESS=i586-unisys-sysv4
13441379
;;
@@ -1560,6 +1595,9 @@ EOF
15601595
*:Unleashed:*:*)
15611596
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
15621597
;;
1598+
*:Ironclad:*:*)
1599+
GUESS=$UNAME_MACHINE-unknown-ironclad
1600+
;;
15631601
esac
15641602

15651603
# Do we have a guess based on uname results?

0 commit comments

Comments
 (0)