Skip to content

Commit 169b546

Browse files
authored
Merge branch 'postgres:master' into main
2 parents 51f3c5b + d278541 commit 169b546

File tree

2,926 files changed

+27700
-16576
lines changed

Some content is hidden

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

2,926 files changed

+27700
-16576
lines changed

.cirrus.tasks.yml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,20 @@ task:
427427
CCACHE_DIR: ${HOME}/ccache
428428
MACPORTS_CACHE: ${HOME}/macports-cache
429429

430+
MACOS_PACKAGE_LIST: >-
431+
ccache
432+
icu
433+
kerberos5
434+
lz4
435+
meson
436+
openldap
437+
openssl
438+
p5.34-io-tty
439+
p5.34-ipc-run
440+
python312
441+
tcl
442+
zstd
443+
430444
CC: ccache cc
431445
CXX: ccache c++
432446
CFLAGS: -Og -ggdb
@@ -463,26 +477,14 @@ task:
463477
macports_cache:
464478
folder: ${MACPORTS_CACHE}
465479
fingerprint_script: |
466-
# Include the OS major version in the cache key. If the OS image changes
467-
# to a different major version, we need to reinstall.
480+
# Reinstall packages if the OS major version, the list of the packages
481+
# to install or the MacPorts install script changes.
468482
sw_vers -productVersion | sed 's/\..*//'
469-
# Also start afresh if we change our MacPorts install script.
483+
echo $MACOS_PACKAGE_LIST
470484
md5 src/tools/ci/ci_macports_packages.sh
471485
reupload_on_changes: true
472486
setup_additional_packages_script: |
473-
sh src/tools/ci/ci_macports_packages.sh \
474-
ccache \
475-
icu \
476-
kerberos5 \
477-
lz4 \
478-
meson \
479-
openldap \
480-
openssl \
481-
p5.34-io-tty \
482-
p5.34-ipc-run \
483-
python312 \
484-
tcl \
485-
zstd
487+
sh src/tools/ci/ci_macports_packages.sh $MACOS_PACKAGE_LIST
486488
# system python doesn't provide headers
487489
sudo /opt/local/bin/port select python3 python312
488490
# Make macports install visible for subsequent steps

.git-blame-ignore-revs

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

17+
6e826278f1ebd9967c0f8adda29c8960a812e344 # 2025-01-13 11:27:32 +0900
18+
# Fix pgindent damage
19+
20+
301de6a6f609cb3ad2d9d31fd8db9ae6c71e6dea # 2024-12-25 17:55:42 +0100
21+
# Partial pgindent of .l and .y files
22+
23+
53dcba9be5746cc126bdb949bf81c29ea2cfc24d # 2024-11-21 21:40:17 +0100
24+
# pgindent run
25+
26+
a7f2f6adc240a2823c2344b89e90bb630dea8803 # 2024-10-16 12:21:13 -0700
27+
# Whitespace fixup from generated unicode tables.
28+
1729
7f7474a8e4002ac9fd4979cc7b16b50b70b70c28 # 2024-09-27 11:14:31 -0400
1830
# Reindent pg_verifybackup.c.
1931

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
* whitespace=space-before-tab,trailing-space
22
*.[chly] whitespace=space-before-tab,trailing-space,indent-with-non-tab,tabwidth=4
3+
*.cpp whitespace=space-before-tab,trailing-space,indent-with-non-tab,tabwidth=4
34
*.pl whitespace=space-before-tab,trailing-space,tabwidth=4
45
*.pm whitespace=space-before-tab,trailing-space,tabwidth=4
56
*.po whitespace=space-before-tab,trailing-space,tab-in-indent,-blank-at-eof
@@ -22,9 +23,12 @@ src/interfaces/ecpg/test/expected/* -whitespace
2223
# These files are maintained or generated elsewhere. We take them as is.
2324
configure -whitespace
2425
ppport.h -whitespace
26+
src/backend/jit/llvm/SectionMemoryManager.cpp -whitespace
27+
src/backend/jit/llvm/SectionMemoryManager.LICENSE -whitespace
2528
src/backend/regex/COPYRIGHT -whitespace
2629
src/backend/snowball/libstemmer/*.c -whitespace
2730
src/backend/utils/mb/Unicode/*-std.txt -whitespace
31+
src/include/jit/SectionMemoryManager.h -whitespace
2832
src/include/snowball/libstemmer/* -whitespace
2933
src/timezone/data/* -whitespace
3034
src/tools/pg_bsd_indent/* -whitespace

COPYRIGHT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PostgreSQL Database Management System
22
(formerly known as Postgres, then as Postgres95)
33

4-
Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
4+
Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
55

66
Portions Copyright (c) 1994, The Regents of the University of California
77

config/c-compiler.m4

Lines changed: 31 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -38,60 +38,6 @@ ac_c_werror_flag=$ac_save_c_werror_flag
3838
])# PGAC_TEST_PRINTF_ARCHETYPE
3939

4040

41-
# PGAC_TYPE_64BIT_INT(TYPE)
42-
# -------------------------
43-
# Check if TYPE is a working 64 bit integer type. Set HAVE_TYPE_64 to
44-
# yes or no respectively, and define HAVE_TYPE_64 if yes.
45-
AC_DEFUN([PGAC_TYPE_64BIT_INT],
46-
[define([Ac_define], [translit([have_$1_64], [a-z *], [A-Z_P])])dnl
47-
define([Ac_cachevar], [translit([pgac_cv_type_$1_64], [ *], [_p])])dnl
48-
AC_CACHE_CHECK([whether $1 is 64 bits], [Ac_cachevar],
49-
[AC_RUN_IFELSE([AC_LANG_SOURCE(
50-
[typedef $1 ac_int64;
51-
52-
/*
53-
* These are globals to discourage the compiler from folding all the
54-
* arithmetic tests down to compile-time constants.
55-
*/
56-
ac_int64 a = 20000001;
57-
ac_int64 b = 40000005;
58-
59-
int does_int64_work()
60-
{
61-
ac_int64 c,d;
62-
63-
if (sizeof(ac_int64) != 8)
64-
return 0; /* definitely not the right size */
65-
66-
/* Do perfunctory checks to see if 64-bit arithmetic seems to work */
67-
c = a * b;
68-
d = (c + b) / b;
69-
if (d != a+1)
70-
return 0;
71-
return 1;
72-
}
73-
74-
int
75-
main() {
76-
return (! does_int64_work());
77-
}])],
78-
[Ac_cachevar=yes],
79-
[Ac_cachevar=no],
80-
[# If cross-compiling, check the size reported by the compiler and
81-
# trust that the arithmetic works.
82-
AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([], [sizeof($1) == 8])],
83-
Ac_cachevar=yes,
84-
Ac_cachevar=no)])])
85-
86-
Ac_define=$Ac_cachevar
87-
if test x"$Ac_cachevar" = xyes ; then
88-
AC_DEFINE(Ac_define, 1, [Define to 1 if `]$1[' works and is 64 bits.])
89-
fi
90-
undefine([Ac_define])dnl
91-
undefine([Ac_cachevar])dnl
92-
])# PGAC_TYPE_64BIT_INT
93-
94-
9541
# PGAC_TYPE_128BIT_INT
9642
# --------------------
9743
# Check if __int128 is a working 128 bit integer type, and if so
@@ -196,7 +142,7 @@ fi])# PGAC_C_STATIC_ASSERT
196142
AC_DEFUN([PGAC_C_TYPEOF],
197143
[AC_CACHE_CHECK(for typeof, pgac_cv_c_typeof,
198144
[pgac_cv_c_typeof=no
199-
for pgac_kw in typeof __typeof__ decltype; do
145+
for pgac_kw in typeof __typeof__; do
200146
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
201147
[int x = 0;
202148
$pgac_kw(x) y;
@@ -270,9 +216,10 @@ fi])# PGAC_C_BUILTIN_CONSTANT_P
270216
AC_DEFUN([PGAC_C_BUILTIN_OP_OVERFLOW],
271217
[AC_CACHE_CHECK(for __builtin_mul_overflow, pgac_cv__builtin_op_overflow,
272218
[AC_LINK_IFELSE([AC_LANG_PROGRAM([
273-
PG_INT64_TYPE a = 1;
274-
PG_INT64_TYPE b = 1;
275-
PG_INT64_TYPE result;
219+
#include <stdint.h>
220+
int64_t a = 1;
221+
int64_t b = 1;
222+
int64_t result;
276223
int oflo;
277224
],
278225
[oflo = __builtin_mul_overflow(a, b, &result);])],
@@ -557,13 +504,13 @@ fi])# PGAC_HAVE_GCC__SYNC_INT32_CAS
557504
# types, and define HAVE_GCC__SYNC_INT64_CAS if so.
558505
AC_DEFUN([PGAC_HAVE_GCC__SYNC_INT64_CAS],
559506
[AC_CACHE_CHECK(for builtin __sync int64 atomic operations, pgac_cv_gcc_sync_int64_cas,
560-
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
561-
[PG_INT64_TYPE lock = 0;
562-
__sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);])],
507+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <stdint.h>],
508+
[int64_t lock = 0;
509+
__sync_val_compare_and_swap(&lock, 0, (int64_t) 37);])],
563510
[pgac_cv_gcc_sync_int64_cas="yes"],
564511
[pgac_cv_gcc_sync_int64_cas="no"])])
565512
if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
566-
AC_DEFINE(HAVE_GCC__SYNC_INT64_CAS, 1, [Define to 1 if you have __sync_val_compare_and_swap(int64 *, int64, int64).])
513+
AC_DEFINE(HAVE_GCC__SYNC_INT64_CAS, 1, [Define to 1 if you have __sync_val_compare_and_swap(int64_t *, int64_t, int64_t).])
567514
fi])# PGAC_HAVE_GCC__SYNC_INT64_CAS
568515

569516
# PGAC_HAVE_GCC__ATOMIC_INT32_CAS
@@ -588,9 +535,9 @@ fi])# PGAC_HAVE_GCC__ATOMIC_INT32_CAS
588535
# types, and define HAVE_GCC__ATOMIC_INT64_CAS if so.
589536
AC_DEFUN([PGAC_HAVE_GCC__ATOMIC_INT64_CAS],
590537
[AC_CACHE_CHECK(for builtin __atomic int64 atomic operations, pgac_cv_gcc_atomic_int64_cas,
591-
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
592-
[PG_INT64_TYPE val = 0;
593-
PG_INT64_TYPE expect = 0;
538+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <stdint.h>],
539+
[int64_t val = 0;
540+
int64_t expect = 0;
594541
__atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);])],
595542
[pgac_cv_gcc_atomic_int64_cas="yes"],
596543
[pgac_cv_gcc_atomic_int64_cas="no"])])
@@ -605,24 +552,26 @@ fi])# PGAC_HAVE_GCC__ATOMIC_INT64_CAS
605552
# test the 8-byte variant, _mm_crc32_u64, but it is assumed to be present if
606553
# the other ones are, on x86-64 platforms)
607554
#
608-
# An optional compiler flag can be passed as argument (e.g. -msse4.2). If the
609-
# intrinsics are supported, sets pgac_sse42_crc32_intrinsics, and CFLAGS_CRC.
555+
# If the intrinsics are supported, sets pgac_sse42_crc32_intrinsics.
610556
AC_DEFUN([PGAC_SSE42_CRC32_INTRINSICS],
611-
[define([Ac_cachevar], [AS_TR_SH([pgac_cv_sse42_crc32_intrinsics_$1])])dnl
612-
AC_CACHE_CHECK([for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=$1], [Ac_cachevar],
613-
[pgac_save_CFLAGS=$CFLAGS
614-
CFLAGS="$pgac_save_CFLAGS $1"
615-
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <nmmintrin.h>],
616-
[unsigned int crc = 0;
617-
crc = _mm_crc32_u8(crc, 0);
618-
crc = _mm_crc32_u32(crc, 0);
619-
/* return computed value, to prevent the above being optimized away */
620-
return crc == 0;])],
557+
[define([Ac_cachevar], [AS_TR_SH([pgac_cv_sse42_crc32_intrinsics])])dnl
558+
AC_CACHE_CHECK([for _mm_crc32_u8 and _mm_crc32_u32], [Ac_cachevar],
559+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <nmmintrin.h>
560+
#if defined(__has_attribute) && __has_attribute (target)
561+
__attribute__((target("sse4.2")))
562+
#endif
563+
static int crc32_sse42_test(void)
564+
{
565+
unsigned int crc = 0;
566+
crc = _mm_crc32_u8(crc, 0);
567+
crc = _mm_crc32_u32(crc, 0);
568+
/* return computed value, to prevent the above being optimized away */
569+
return crc == 0;
570+
}],
571+
[return crc32_sse42_test();])],
621572
[Ac_cachevar=yes],
622-
[Ac_cachevar=no])
623-
CFLAGS="$pgac_save_CFLAGS"])
573+
[Ac_cachevar=no])])
624574
if test x"$Ac_cachevar" = x"yes"; then
625-
CFLAGS_CRC="$1"
626575
pgac_sse42_crc32_intrinsics=yes
627576
fi
628577
undefine([Ac_cachevar])dnl
@@ -732,13 +681,14 @@ AC_DEFUN([PGAC_AVX512_POPCNT_INTRINSICS],
732681
[define([Ac_cachevar], [AS_TR_SH([pgac_cv_avx512_popcnt_intrinsics])])dnl
733682
AC_CACHE_CHECK([for _mm512_popcnt_epi64], [Ac_cachevar],
734683
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <immintrin.h>
684+
#include <stdint.h>
735685
#if defined(__has_attribute) && __has_attribute (target)
736686
__attribute__((target("avx512vpopcntdq,avx512bw")))
737687
#endif
738688
static int popcount_test(void)
739689
{
740690
const char buf@<:@sizeof(__m512i)@:>@;
741-
PG_INT64_TYPE popcnt = 0;
691+
int64_t popcnt = 0;
742692
__m512i accum = _mm512_setzero_si512();
743693
const __m512i val = _mm512_maskz_loadu_epi8((__mmask64) 0xf0f0f0f0f0f0f0f0, (const __m512i *) buf);
744694
const __m512i cnt = _mm512_popcnt_epi64(val);

config/check_modules.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# Copyright (c) 2024, PostgreSQL Global Development Group
2+
# Copyright (c) 2024-2025, PostgreSQL Global Development Group
33

44
#
55
# Verify that required Perl modules are available,

0 commit comments

Comments
 (0)