Skip to content

Commit 3894805

Browse files
Merge pull request #613 from ApsaraDB/merge_15_15
merge: merge with PostgreSQL 15.15
2 parents 6e5f854 + 5fb59da commit 3894805

File tree

195 files changed

+12989
-8636
lines changed

Some content is hidden

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

195 files changed

+12989
-8636
lines changed

.abi-compliance-history

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Reference point for ABI compliance checks
2+
#
3+
# This file lists commits on the current branch that break ABI compatibility in
4+
# ways that have been deemed acceptable (e.g., removing an extern function with
5+
# no third-party uses). The primary intent of this file is to control the ABI
6+
# compliance checks on the buildfarm, but it also serves as a central location
7+
# to document the justification for each.
8+
#
9+
# In general, entries should be added reactively after an abi-compliance-check
10+
# buildfarm failure. It is important to verify the details of the breakage
11+
# match expectations, as the first entry listed will become the updated ABI
12+
# baseline point.
13+
#
14+
# Add new entries by adding the output of the following to the top of the file:
15+
#
16+
# $ git log --pretty=format:"%H%n#%n# %s%n# %cd%n#%n# <ADD JUSTIFICATION HERE>" $ABIBREAKGITHASH -1 --date=iso
17+
#
18+
# Be sure to replace "<ADD JUSTIFICATION HERE>" with details of your change and
19+
# why it is deemed acceptable.
20+
21+
fc0fb77c550fe8289d718c33c7aacf16023d9941
22+
#
23+
# Fix re-distributing previously distributed invalidation messages during logical decoding.
24+
# 2025-06-16 17:35:53 -0700
25+
#
26+
# This is the original ABI baseline point for REL_15_STABLE. The first entry
27+
# would ordinarily point to something just before the .0 release, but this file
28+
# was first added in October 2025, and we're unlikely to act upon ABI breaks in
29+
# released minor versions, so we've chosen to truncate the ABI history to start
30+
# with the most recent ABI break documented in the git commit history.

.cirrus.star

Lines changed: 74 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ https://github.com/bazelbuild/starlark/blob/master/spec.md
77
See also .cirrus.yml and src/tools/ci/README
88
"""
99

10-
load("cirrus", "env", "fs")
10+
load("cirrus", "env", "fs", "re", "yaml")
1111

1212

1313
def main():
@@ -18,32 +18,102 @@ def main():
1818
1919
1) the contents of .cirrus.yml
2020
21-
2) if defined, the contents of the file referenced by the, repository
21+
2) computed environment variables
22+
23+
3) if defined, the contents of the file referenced by the, repository
2224
level, REPO_CI_CONFIG_GIT_URL variable (see
2325
https://cirrus-ci.org/guide/programming-tasks/#fs for the accepted
2426
format)
2527
26-
3) .cirrus.tasks.yml
28+
4) .cirrus.tasks.yml
2729
"""
2830

2931
output = ""
3032

3133
# 1) is evaluated implicitly
3234

35+
3336
# Add 2)
37+
additional_env = compute_environment_vars()
38+
env_fmt = """
39+
###
40+
# Computed environment variables start here
41+
###
42+
{0}
43+
###
44+
# Computed environment variables end here
45+
###
46+
"""
47+
output += env_fmt.format(yaml.dumps({'env': additional_env}))
48+
49+
50+
# Add 3)
3451
repo_config_url = env.get("REPO_CI_CONFIG_GIT_URL")
3552
if repo_config_url != None:
3653
print("loading additional configuration from \"{}\"".format(repo_config_url))
3754
output += config_from(repo_config_url)
3855
else:
3956
output += "\n# REPO_CI_CONFIG_URL was not set\n"
4057

41-
# Add 3)
58+
59+
# Add 4)
4260
output += config_from(".cirrus.tasks.yml")
4361

62+
4463
return output
4564

4665

66+
def compute_environment_vars():
67+
cenv = {}
68+
69+
###
70+
# Some tasks are manually triggered by default because they might use too
71+
# many resources for users of free Cirrus credits, but they can be
72+
# triggered automatically by naming them in an environment variable e.g.
73+
# REPO_CI_AUTOMATIC_TRIGGER_TASKS="task_name other_task" under "Repository
74+
# Settings" on Cirrus CI's website.
75+
76+
default_manual_trigger_tasks = []
77+
78+
repo_ci_automatic_trigger_tasks = env.get('REPO_CI_AUTOMATIC_TRIGGER_TASKS', '')
79+
for task in default_manual_trigger_tasks:
80+
name = 'CI_TRIGGER_TYPE_' + task.upper()
81+
if repo_ci_automatic_trigger_tasks.find(task) != -1:
82+
value = 'automatic'
83+
else:
84+
value = 'manual'
85+
cenv[name] = value
86+
###
87+
88+
###
89+
# Parse "ci-os-only:" tag in commit message and set
90+
# CI_{$OS}_ENABLED variable for each OS
91+
92+
operating_systems = [
93+
'freebsd',
94+
'linux',
95+
'macos',
96+
'windows',
97+
]
98+
commit_message = env.get('CIRRUS_CHANGE_MESSAGE')
99+
match_re = r"(^|.*\n)ci-os-only: ([^\n]+)($|\n.*)"
100+
101+
# re.match() returns an array with a tuple of (matched-string, match_1, ...)
102+
m = re.match(match_re, commit_message)
103+
if m and len(m) > 0:
104+
os_only = m[0][2]
105+
os_only_list = re.split(r'[, ]+', os_only)
106+
else:
107+
os_only_list = operating_systems
108+
109+
for os in operating_systems:
110+
os_enabled = os in os_only_list
111+
cenv['CI_{0}_ENABLED'.format(os.upper())] = os_enabled
112+
###
113+
114+
return cenv
115+
116+
47117
def config_from(config_src):
48118
"""return contents of config file `config_src`, surrounded by markers
49119
indicating start / end of the the included file

.cirrus.tasks.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ task:
4747

4848
<<: *freebsd_task_template
4949

50-
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*freebsd.*'
50+
only_if: $CI_FREEBSD_ENABLED
5151

5252
sysinfo_script: |
5353
id
@@ -76,6 +76,7 @@ task:
7676
# freebsd already takes longer than other platforms except for windows.
7777
configure_script: |
7878
su postgres <<-EOF
79+
set -e
7980
./configure \
8081
--enable-cassert --enable-debug --enable-tap-tests \
8182
--enable-nls \
@@ -138,13 +139,13 @@ LINUX_CONFIGURE_FEATURES: &LINUX_CONFIGURE_FEATURES >-
138139

139140

140141
task:
141-
name: Linux - Debian Bookworm
142+
name: Linux - Debian Trixie
142143

143144
env:
144145
CPUS: 4
145146
BUILD_JOBS: 4
146147
TEST_JOBS: 8 # experimentally derived to be a decent choice
147-
IMAGE_FAMILY: pg-ci-bookworm
148+
IMAGE_FAMILY: pg-ci-trixie
148149

149150
CCACHE_DIR: /tmp/ccache_dir
150151
DEBUGINFOD_URLS: "https://debuginfod.debian.net"
@@ -153,7 +154,7 @@ task:
153154

154155
<<: *linux_task_template
155156

156-
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*linux.*'
157+
only_if: $CI_LINUX_ENABLED
157158

158159
ccache_cache:
159160
folder: ${CCACHE_DIR}
@@ -181,6 +182,7 @@ task:
181182
182183
configure_script: |
183184
su postgres <<-EOF
185+
set -e
184186
./configure \
185187
--enable-cassert --enable-debug --enable-tap-tests \
186188
--enable-nls \
@@ -198,6 +200,7 @@ task:
198200

199201
test_world_script: |
200202
su postgres <<-EOF
203+
set -e
201204
ulimit -c unlimited # default is 0
202205
make -s ${CHECK} ${CHECKFLAGS} -j${TEST_JOBS}
203206
EOF
@@ -208,7 +211,7 @@ task:
208211

209212

210213
task:
211-
name: macOS - Sonoma
214+
name: macOS - Sequoia
212215

213216
env:
214217
CPUS: 4 # always get that much for cirrusci macOS instances
@@ -217,7 +220,7 @@ task:
217220
# work OK. See
218221
# https://postgr.es/m/20220927040208.l3shfcidovpzqxfh%40awork3.anarazel.de
219222
TEST_JOBS: 8
220-
IMAGE: ghcr.io/cirruslabs/macos-runner:sonoma
223+
IMAGE: ghcr.io/cirruslabs/macos-runner:sequoia
221224

222225
CIRRUS_WORKING_DIR: ${HOME}/pgsql/
223226
CCACHE_DIR: ${HOME}/ccache
@@ -239,7 +242,7 @@ task:
239242
240243
<<: *macos_task_template
241244

242-
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*(macos|darwin|osx).*'
245+
only_if: $CI_MACOS_ENABLED
243246

244247
sysinfo_script: |
245248
id
@@ -328,7 +331,7 @@ task:
328331

329332

330333
task:
331-
name: Windows - Server 2019, VS 2019
334+
name: Windows - Server 2022, VS 2019
332335

333336
env:
334337
# Half the allowed per-user CPU cores
@@ -389,7 +392,7 @@ task:
389392

390393
<<: *windows_task_template
391394

392-
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*windows.*'
395+
only_if: $CI_WINDOWS_ENABLED
393396

394397
sysinfo_script: |
395398
chcp
@@ -460,12 +463,12 @@ task:
460463

461464
# To limit unnecessary work only run this once the normal linux test succeeds
462465
depends_on:
463-
- Linux - Debian Bookworm
466+
- Linux - Debian Trixie
464467

465468
env:
466469
CPUS: 4
467470
BUILD_JOBS: 4
468-
IMAGE_FAMILY: pg-ci-bookworm
471+
IMAGE_FAMILY: pg-ci-trixie
469472

470473
# Use larger ccache cache, as this task compiles with multiple compilers /
471474
# flag combinations
@@ -476,7 +479,7 @@ task:
476479

477480
# task that did not run, count as a success, so we need to recheck Linux'
478481
# condition here ...
479-
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*linux.*'
482+
only_if: $CI_LINUX_ENABLED
480483

481484
<<: *linux_task_template
482485

@@ -554,10 +557,10 @@ task:
554557
always:
555558
mingw_cross_warning_script: |
556559
time ./configure \
557-
--host=x86_64-w64-mingw32 \
560+
--host=x86_64-w64-mingw32ucrt \
558561
--enable-cassert \
559-
CC="ccache x86_64-w64-mingw32-gcc" \
560-
CXX="ccache x86_64-w64-mingw32-g++"
562+
CC="ccache x86_64-w64-mingw32ucrt-gcc" \
563+
CXX="ccache x86_64-w64-mingw32ucrt-g++"
561564
make -s -j${BUILD_JOBS} clean
562565
time make -s -j${BUILD_JOBS} world-bin
563566

.cirrus.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,20 @@
1010
#
1111
# 1) the contents of this file
1212
#
13-
# 2) if defined, the contents of the file referenced by the, repository
13+
# 2) computed environment variables
14+
#
15+
# Used to enable/disable tasks based on the execution environment. See
16+
# .cirrus.star: compute_environment_vars()
17+
#
18+
# 3) if defined, the contents of the file referenced by the, repository
1419
# level, REPO_CI_CONFIG_GIT_URL variable (see
1520
# https://cirrus-ci.org/guide/programming-tasks/#fs for the accepted
1621
# format)
1722
#
18-
# 3) .cirrus.tasks.yml
23+
# This allows running tasks in a different execution environment than the
24+
# default, e.g. to have sufficient resources for cfbot.
25+
#
26+
# 4) .cirrus.tasks.yml
1927
#
2028
# This composition is done by .cirrus.star
2129

.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+
f9790ac5464da45eb44470ab831584356381597b # 2025-10-21 09:56:26 -0500
18+
# Re-pgindent brin.c.
19+
1720
d04649cd9674a5408bada0c1d5f543a931ab675f # 2024-08-29 21:34:37 +0800
1821
# feat: prior indent run for PolarDB-PG 15
1922

.gitattributes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
*.x[ms]l whitespace=space-before-tab,trailing-space,tab-in-indent
88

99
# Avoid confusing ASCII underlines with leftover merge conflict markers
10-
README conflict-marker-size=32
11-
README.* conflict-marker-size=32
10+
README conflict-marker-size=48
11+
README.* conflict-marker-size=48
1212

1313
# Certain data files that contain special whitespace, and other special cases
1414
*.data -whitespace

0 commit comments

Comments
 (0)