Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
e56698d
Add check for large files in meson.build
michaelpq Nov 12, 2025
f1aaf0b
Report better object limits in error messages for injection points
michaelpq Nov 12, 2025
cbd9863
doc: Fix incorrect synopsis for ALTER PUBLICATION ... DROP ...
MasaoFujii Nov 12, 2025
fb21d8f
Fix pg_upgrade around multixid and mxoff wraparound
hlinnaka Nov 12, 2025
d495557
Change coding pattern for CURL_IGNORE_DEPRECATION()
alvherre Nov 12, 2025
2779d10
Fix range for commit_siblings in sample conf
danielgustafsson Nov 12, 2025
68aa8fb
doc: Document effects of ownership change on privileges
danielgustafsson Nov 12, 2025
b31b522
Escalate ERRORs during async notify processing to FATAL
hlinnaka Nov 12, 2025
1955137
Fix bug where we truncated CLOG that was still needed by LISTEN/NOTIFY
hlinnaka Nov 12, 2025
fc30eeb
Fix remaining race condition with CLOG truncation and LISTEN/NOTIFY
hlinnaka Nov 12, 2025
ab4d064
Sync meson.build and .pl with PG upstream commits.
hs-liuxh Feb 13, 2026
77b3108
Clear 'xid' in dummy async notify entries written to fill up pages
hlinnaka Nov 12, 2025
1669d63
Teach DSM registry to ERROR if attaching to an uninitialized entry.
nathan-bossart Nov 12, 2025
0639d1e
doc: Improve description of RLS policies applied by command type.
deanrasheed Nov 13, 2025
5a3e052
pgbench: Fix assertion failure with multiple \syncpipeline in pipelin…
MasaoFujii Nov 14, 2025
65daeb1
Add note about CreateStatistics()'s selective use of check_rights.
nathan-bossart Nov 14, 2025
814c9e0
Comment out autovacuum_worker_slots in postgresql.conf.sample.
nathan-bossart Nov 14, 2025
6e6b00e
Doc: include MERGE in variable substitution command list
david-rowley Nov 16, 2025
dfeb9d9
Fix Assert failure in EXPLAIN ANALYZE MERGE with a concurrent update.
deanrasheed Nov 16, 2025
278d613
Define PS_USE_CLOBBER_ARGV on GNU/Hurd.
macdice Nov 16, 2025
ccfb240
Mention md5 deprecation in postgresql.conf.sample
danielgustafsson Nov 17, 2025
32d764e
Clean up match_orclause_to_indexcol().
tglsfdc Nov 17, 2025
11958d3
Update .abi-compliance-history for change to CreateStatistics().
nathan-bossart Nov 17, 2025
d61ef78
Fix pg_crc32c_armv8_choose.c to build with ancient glibc releases.
tglsfdc Nov 17, 2025
2d93bea
doc: clarify that pg_upgrade preserves "optimizer" stats.
bmomjian Nov 17, 2025
6d7981d
Don't allow CTEs to determine semantic levels of aggregates.
tglsfdc Nov 18, 2025
6d71549
Fix typo
alvherre Nov 18, 2025
b4a8a3f
Fix pg_popcount_aarch64.c to build with ancient glibc releases.
tglsfdc Nov 18, 2025
0d36cd3
Fix typo in nodeHash.c
Nov 19, 2025
8e4e204
doc: Update formula for vacuum insert threshold.
nathan-bossart Nov 19, 2025
9ec5359
Print new OldestXID value in pg_resetwal when it's being changed
hlinnaka Nov 19, 2025
6039a3e
Sync pg18.2 regression case and expected out to oracle directory.
hs-liuxh Feb 13, 2026
07dc940
doc: Update pg_upgrade documentation to match recent description chan…
MasaoFujii Nov 20, 2025
6e109c8
Handle EPERM in pg_numa_init
tvondra Nov 20, 2025
01788f1
jit: Adjust AArch64-only code for LLVM 21.
macdice Nov 22, 2025
1de6f9f
Fix incorrect IndexOptInfo header comment
david-rowley Nov 24, 2025
0f95a8b
lwlock: Fix, currently harmless, bug in LWLockWakeup()
anarazel Nov 24, 2025
70c3273
pg_dump tests: don't put dumps in stdout
alvherre Nov 25, 2025
852aa76
oauth_validator: Shorten JSON responses in test logs
jchampio Nov 26, 2025
7d4182d
doc: Clarify passphrase command reloading on Windows
danielgustafsson Nov 26, 2025
b202415
Revert "Teach DSM registry to ERROR if attaching to an uninitialized …
nathan-bossart Nov 26, 2025
2d36222
Teach DSM registry to retry entry initialization if needed.
nathan-bossart Nov 26, 2025
47a3cde
Fix error reporting for SQL/JSON path type mismatches
amitlan Nov 27, 2025
106dd59
doc: Fix misleading synopsis for CREATE/ALTER PUBLICATION.
MasaoFujii Nov 27, 2025
6c0e28a
Allow indexscans on partial hash indexes with implied quals.
tglsfdc Nov 27, 2025
0046236
Avoid rewriting data-modifying CTEs more than once.
deanrasheed Nov 29, 2025
ac72915
Update obsolete row compare preprocessing comments.
petergeoghegan Nov 29, 2025
66164ba
Fix amcheck's handling of incomplete root splits in B-tree
hlinnaka Dec 2, 2025
7db372b
Fix amcheck's handling of half-dead B-tree pages
hlinnaka Dec 2, 2025
87f0868
Set next multixid's offset when creating a new multixid
hlinnaka Dec 3, 2025
a160703
amcheck: Fix snapshot usage in bt_index_parent_check
alvherre Dec 4, 2025
408066f
Show version of nodes in output of TAP tests
michaelpq Dec 5, 2025
90d2ac9
Sync test files from PostgreSQL master
hs-liuxh Feb 13, 2026
25865ca
Fix setting next multixid's offset at offset wraparound
hlinnaka Dec 5, 2025
a47061d
Fix text substring search for non-deterministic collations.
tglsfdc Dec 6, 2025
5876237
Prevent invalidation of newly created replication slots.
Dec 8, 2025
a8844af
Unify error messages
alvherre Dec 8, 2025
95a9f56
Doc: fix typo in hash index documentation
david-rowley Dec 9, 2025
f8aa9c7
Fix LOCK_TIMEOUT handling in slotsync worker.
Dec 9, 2025
04ba313
doc: Fix statement about ON CONFLICT and deferrable constraints.
deanrasheed Dec 9, 2025
d8733d5
doc: Fix titles of some pg_buffercache functions.
nathan-bossart Dec 9, 2025
6cd02d4
Fix O_CLOEXEC flag handling in Windows port.
macdice Dec 9, 2025
c2b603f
Fix failures with cross-version pg_upgrade tests
michaelpq Dec 10, 2025
024c1ba
Fix some near-bugs related to ResourceOwner function arguments
hlinnaka Dec 10, 2025
8981f8c
Fix bogus extra arguments to query_safe in test
hlinnaka Dec 10, 2025
c200e00
Fix allocation formula in llvmjit_expr.c
michaelpq Dec 11, 2025
b494ffb
pg_buffercache: Fix memory allocation formula
michaelpq Dec 11, 2025
ccfa76e
Clarify comment on multixid offset wraparound check
hlinnaka Dec 15, 2025
d9adff8
Revisit cosmetics of "For inplace update, send nontransactional inval…
nmisch Dec 15, 2025
8d5a0fe
libpq: Add missing OAuth translations
jchampio Dec 15, 2025
b125f29
libpq-oauth: Don't translate internal errors
jchampio Dec 15, 2025
f994109
libpq: Align oauth_json_set_error() with other NLS patterns
jchampio Dec 15, 2025
340daf2
Fail recovery when missing redo checkpoint record without backup_label
michaelpq Dec 16, 2025
e730976
Sync test file changes from upstream PostgreSQL to oracle_test
hs-liuxh Feb 13, 2026
49e1af7
doc: Update header file mention for CompareType
danielgustafsson Dec 16, 2025
d948a28
Switch memory contexts in ReinitializeParallelDSM.
robertmhaas Dec 16, 2025
7453f34
Update .abi-compliance-history for CacheInvalidateHeapTupleInplace().
nmisch Dec 16, 2025
0af5ce8
Fix multibyte issue in ltree_strncasecmp().
jeff-davis Dec 16, 2025
d12fb54
ltree: fix case-insensitive matching.
jeff-davis Dec 16, 2025
93e65c6
Make postmaster 003_start_stop.pl test less flaky
hlinnaka Dec 17, 2025
dad9014
libpq-fe.h: Don't claim SOCKTYPE in the global namespace
jchampio Dec 17, 2025
367def5
libpq-oauth: use correct c_args in meson.build
jchampio Dec 17, 2025
ae7202e
oauth_validator: Avoid races in log_check()
jchampio Dec 17, 2025
ea8143f
Do not emit WAL for unlogged BRIN indexes
hlinnaka Dec 18, 2025
bc9d5fe
Sort DO_SUBSCRIPTION_REL dump objects independent of OIDs.
nmisch Dec 18, 2025
4d6bf4d
Add guard to prevent recursive memory context logging.
MasaoFujii Dec 19, 2025
466bb49
Update pg_hba.conf example to reflect MD5 deprecation
j-naylor Dec 19, 2025
5dc4257
Clean up test_cloexec.c and Makefile.
macdice Dec 21, 2025
afa7a37
doc: Fix incorrect reference in pg_overexplain documentation.
MasaoFujii Dec 22, 2025
385604a
Fix orphaned origin in shared memory after DROP SUBSCRIPTION
michaelpq Dec 23, 2025
759a14b
Add missing .gitignore for src/test/modules/test_cloexec.
tglsfdc Dec 22, 2025
cb720c5
Fix bug in following update chain when locking a heap tuple
hlinnaka Dec 23, 2025
e1d0781
Sync test infrastructure and test cases from PostgreSQL master to ora…
hs-liuxh Feb 13, 2026
357ea02
Don't advance origin during apply failure.
Dec 24, 2025
02ea70e
Update comments to reflect changes in 8e0d32a4a1.
Dec 24, 2025
5fa98e0
doc: Use proper tags in pg_overexplain documentation.
MasaoFujii Dec 24, 2025
8e4eec2
psql: Fix tab completion for VACUUM option values.
MasahikoSawada Dec 24, 2025
f4ca371
Fix planner error with SRFs and grouping sets
Dec 25, 2025
d4642b5
doc: Remove duplicate word in ECPG description
michaelpq Dec 26, 2025
1d69405
doc: warn about the use of "ctid" queries beyond the examples
bmomjian Dec 26, 2025
3249b83
Fix pg_stat_get_backend_activity() to use multi-byte truncated result
michaelpq Dec 27, 2025
44694cc
Add oauth_validator_libraries to variable_is_guc_list_quote
danielgustafsson Dec 27, 2025
d437947
Strip PlaceHolderVars from index operands
Dec 29, 2025
7e5986c
Ignore PlaceHolderVars when looking up statistics
Dec 29, 2025
0b30b85
Fix Mkvcbuild.pm builds of test_cloexec.c.
macdice Dec 29, 2025
19d779f
jit: Remove -Wno-deprecated-declarations in 18+.
macdice Dec 30, 2025
e7f8587
Fix a race condition in updating procArray->replication_slot_xmin.
MasahikoSawada Dec 30, 2025
dabeb82
jit: Fix jit_profiling_support when unavailable.
macdice Dec 31, 2025
6b1b483
Fix macro name for io_uring_queue_init_mem check.
MasahikoSawada Dec 31, 2025
8362669
Update copyright for 2026
bmomjian Jan 1, 2026
6f536ef
Fix selectivity estimation integer overflow in contrib/intarray
david-rowley Jan 4, 2026
464b0ab
Doc: add missing punctuation
david-rowley Jan 4, 2026
042d311
Tighten up assertion on a local variable
hlinnaka Jan 5, 2026
78124b6
ci: Remove ulimit -p for netbsd/openbsd
anarazel Jan 5, 2026
fb3ecfc
doc: Fix outdated doc in pg_rewind.
MasaoFujii Jan 6, 2026
9458ab9
Sync test file changes from PG master to oracle_test
hs-liuxh Feb 14, 2026
ab77b4f
Fix misleading comment for GetOperatorFromCompareType
david-rowley Jan 6, 2026
30b7acb
Honor GUC settings specified in CREATE SUBSCRIPTION CONNECTION.
MasaoFujii Jan 6, 2026
e5f994c
Add TAP test for GUC settings passed via CONNECTION in logical replic…
MasaoFujii Jan 6, 2026
3761dc8
Fix issue with EVENT TRIGGERS and ALTER PUBLICATION
david-rowley Jan 6, 2026
9d9ef38
Update comments atop ReplicationSlotCreate.
Jan 6, 2026
dfe7e4e
Fix buggy interaction between array subscripts and subplan params
anarazel Jan 7, 2026
65138df
Further doc updates to reflect MD5 deprecation
j-naylor Jan 7, 2026
9d79a1c
createuser: Update docs to reflect defaults
j-naylor Jan 7, 2026
2e59e6c
Fix typo
petere Jan 7, 2026
42723d4
Fix nbtree skip array transformation comments.
petergeoghegan Jan 7, 2026
e229a63
Fix possible incorrect column reference in ERROR message
david-rowley Jan 8, 2026
9ea773d
pg_dump: Fix gathering of sequence information.
nathan-bossart Jan 9, 2026
fdc247f
doc: Improve description of publish_via_partition_root
jchampio Jan 9, 2026
3e11d31
pg_dump: Fix memory leak in dumpSequenceData().
nathan-bossart Jan 11, 2026
bc1ff5f
doc: Document DEFAULT option in file_fdw.
MasaoFujii Jan 13, 2026
9caee44
Fix query jumbling with GROUP BY clauses
michaelpq Jan 13, 2026
8d430ee
pg_waldump: Relax LSN comparison check in TAP test
michaelpq Jan 14, 2026
a2c07c8
Add check for invalid offset at multixid truncation
hlinnaka Jan 15, 2026
27aaead
aio: io_uring: Fix danger of completion getting reused before being read
anarazel Jan 15, 2026
523022c
Fix 'unexpected data beyond EOF' on replica restart
hlinnaka Jan 15, 2026
6c0786b
Sync test changes from PG commits 1e9a5917feb and ef4e2463e4a
hs-liuxh Feb 14, 2026
075bd86
pgindent fix for 8077649907d
anarazel Jan 15, 2026
2234fc5
Fix segfault from releasing locks in detached DSM segments
amitlan Jan 16, 2026
07119b9
Fix rowmark handling for non-relation RTEs during executor init
amitlan Jan 16, 2026
3e57f7e
Fix crash in test function on removable_cutoff(NULL)
hlinnaka Jan 16, 2026
590a507
Fix error message related to end TLI in backup manifest
michaelpq Jan 18, 2026
d85da9e
Update time zone data files to tzdata release 2025c.
tglsfdc Jan 18, 2026
ebbd25a
Fix unsafe pushdown of quals referencing grouping Vars
Jan 19, 2026
564b480
Don't set the truncation block length greater than RELSEG_SIZE.
robertmhaas Jan 19, 2026
c548e47
pg_stat_statements: Fix crash in list squashing with Vars
michaelpq Jan 19, 2026
d7ea254
doc: revert "xreflabel" used for PL/Python & libpq chapters
bmomjian Jan 20, 2026
adc424f
amcheck: Fix snapshot usage in bt_index_parent_check
alvherre Jan 21, 2026
f309272
jit: Add missing inline pass for LLVM >= 17.
macdice Jan 22, 2026
2077ba5
doc: Mention pg_get_partition_constraintdef()
michaelpq Jan 22, 2026
4fa1b16
Remove faulty Assert in partitioned INSERT...ON CONFLICT DO UPDATE.
tglsfdc Jan 22, 2026
bf15601
Fix bogus ctid requirement for dummy-root partitioned targets
amitlan Jan 23, 2026
2a91fd4
Fix trigger transition table capture for MERGE in CTE queries.
deanrasheed Jan 24, 2026
4275be0
Fix possible issue of a WindowFunc being in the wrong WindowClause
david-rowley Jan 26, 2026
37591d8
Reduce length of TAP test file name.
robertmhaas Jan 26, 2026
42a7934
Lookup the correct ordering for parallel GIN builds
tvondra Jan 26, 2026
a536757
Exercise parallel GIN builds in regression tests
tvondra Jan 26, 2026
dec1f14
Sync test changes from upstream PG 18.2.
hs-liuxh Feb 24, 2026
5e8396f
Handle ENOENT status when querying NUMA node
tvondra Jan 26, 2026
3e9f114
pgindent fix for 3fccbd94cba
tvondra Jan 26, 2026
de052c2
Prevent invalidation of newly synced replication slots.
Jan 27, 2026
c102ba8
Fix crash introduced by incorrect backport 806555e300.
jeff-davis Jan 27, 2026
2328f3f
oauth: Correct test dependency on oauth_hook_client
jchampio Jan 27, 2026
b94ed09
Fix CI failure introduced in commit 851f6649cc.
Jan 29, 2026
d3bb844
psql: Disable %P (pipeline status) for non-active connection
michaelpq Jan 29, 2026
3fe71af
Fix theoretical memory leaks in pg_locale_libc.c.
jeff-davis Jan 29, 2026
6abaed9
Update .abi-compliance-history for change to TransitionCaptureState.
deanrasheed Jan 30, 2026
679dcda
Improve guards against false regex matches in BackgroundPsql.pm.
tglsfdc Jan 30, 2026
7b89f54
Fix build inconsistency due to the generation of wait-event code
michaelpq Feb 1, 2026
2872dd0
Fix error message in RemoveWalSummaryIfOlderThan()
michaelpq Feb 2, 2026
043b72c
Fix incorrect errno in OpenWalSummaryFile()
michaelpq Feb 3, 2026
e49fecf
Reject ADD CONSTRAINT NOT NULL if name mismatches existing constraint
alvherre Feb 3, 2026
f166660
Update .abi-compliance-history for AdjustNotNullInheritance().
alvherre Feb 3, 2026
e72abc8
pg_resetwal: Fix incorrect error message related to pg_wal/summaries/
michaelpq Feb 4, 2026
fa38b93
Fix various instances of undefined behavior
j-naylor Feb 4, 2026
3214d6e
Fix logical replication TAP test to read publisher log correctly.
MasaoFujii Feb 4, 2026
c1830b2
doc: Move synchronized_standby_slots to "Primary Server" section.
MasaoFujii Feb 6, 2026
f0378de
Add file_extend_method=posix_fallocate,write_zeros.
macdice May 31, 2025
1fd2100
Sync test changes from upstream PG 18.2.
hs-liuxh Feb 24, 2026
2cfcf09
Fix some error message inconsistencies
michaelpq Feb 6, 2026
bf276f6
Fix use of proc number in pgstat_create_backend()
michaelpq Feb 6, 2026
6f02f40
First-draft release notes for 18.2.
tglsfdc Feb 6, 2026
acfb829
Placate ABI checker.
macdice Feb 6, 2026
7331400
Further error message fix
petere Feb 7, 2026
cd20109
meson: host_system value for Solaris is 'sunos' not 'solaris'.
tglsfdc Feb 8, 2026
747c9bc
Translation updates
petere Feb 8, 2026
2e44db0
Release notes for 18.2, 17.8, 16.12, 15.16, 14.21.
tglsfdc Feb 8, 2026
7f7d780
pgcrypto: Fix buffer overflow in pgp_pub_decrypt_bytea()
michaelpq Feb 8, 2026
af9d841
Remove 'charlen' argument from make_trigrams()
hlinnaka Jan 20, 2026
b154b06
Fix buffer overflows in pg_trgm due to lower-casing
hlinnaka Jan 20, 2026
1cdc1f6
Fix encoding length for EUC_CN.
macdice Feb 4, 2026
74b7399
Fix mb2wchar functions on short input.
macdice Jan 25, 2026
96e6ed4
Replace pg_mblen() with bounds-checked versions.
macdice Jan 7, 2026
f239617
Code coverage for most pg_mblen* calls.
macdice Jan 11, 2026
ac0514e
Require PGP-decrypted text to pass encoding validation.
nmisch Feb 9, 2026
bb9a6ac
Guard against unexpected dimensions of oidvector/int2vector.
tglsfdc Feb 9, 2026
9197956
Require superuser to install a non-built-in selectivity estimator.
tglsfdc Feb 9, 2026
6d62ee0
Harden _int_matchsel() against being attached to the wrong operator.
tglsfdc Feb 9, 2026
801b6ca
Fix test "NUL byte in text decrypt" for --without-zlib builds.
nmisch Feb 9, 2026
cd232f5
Last-minute updates for release notes.
tglsfdc Feb 9, 2026
0c51ac2
Stamp 18.2.
tglsfdc Feb 9, 2026
ac8026e
Sync test changes from upstream PG 18.2.
hs-liuxh Feb 24, 2026
594284f
Sync test changes form upstream PG 18.2
hs-liuxh Feb 25, 2026
97ba68c
Sync upstream PG 18.2 commits and fix pgcrypto Oracle compatibility t…
hs-liuxh Feb 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
46 changes: 46 additions & 0 deletions .abi-compliance-history
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,52 @@
# Be sure to replace "<ADD JUSTIFICATION HERE>" with details of your change and
# why it is deemed acceptable.

33e3de6d77e87d6c3c6f8f878dd8de42d37c3b8f
#
# Add file_extend_method=posix_fallocate,write_zeros.
# 2026-02-06 17:38:39 +1300
#
# Modifying GUC tables isn't really an ABI break: the relevant object has
# incomplete type so its layout is unknown to other C translation units.
#
# Discussion: https://www.postgresql.org/message-id/flat/e1f0cd3b-0164-45f5-9705-e922e59df90f%40dunslane.net#8a350b54012c0042f9869d288e978cfe

492a69e1407029f8c673484f44aa719a63323d77
#
# Reject ADD CONSTRAINT NOT NULL if name mismatches existing constraint
# 2026-02-03 12:33:29 +0100
#
# This commit added the constraint name as a parameter to
# AdjustNotNullInheritance(), which it needed to verify that the new name
# matches the existing one. PGXN contained no calls to that function.

c6ce4dcf9d3b7a8a89aca386124c473f98fc329e
#
# Fix trigger transition table capture for MERGE in CTE queries.
# 2026-01-24 11:30:48 +0000
#
# This commit changed the TransitionCaptureState structure, replacing
# the "tcs_private" field with 3 separate fields. This structure can
# only be built using MakeTransitionCaptureState(), and PGXN contained
# no calls to MakeTransitionCaptureState() or uses of the
# TransitionCaptureState structure.

bae8ca82fd00603ebafa0658640d6e4dfe20af92
#
# Revisit cosmetics of "For inplace update, send nontransactional invalidations."
# 2025-12-15 12:19:53 -0800
#
# This removed a CacheInvalidateHeapTupleInplace() parameter. PGXN contained
# no calls to that function.

00eb646ea43410e5df77fed96f4a981e66811796
#
# Check for CREATE privilege on the schema in CREATE STATISTICS.
# 2025-11-10 09:00:00 -0600
#
# This commit added a parameter to CreateStatistics(). We are unaware of any
# impacted third-party code.

c8af5019bee5c57502db830f8005a01cba60fee0
#
# Fix lookups in pg_{clear,restore}_{attribute,relation}_stats().
Expand Down
5 changes: 1 addition & 4 deletions .cirrus.tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,6 @@ task:
su postgres <<-EOF
set -e
ulimit -c unlimited
# Otherwise tests will fail on OpenBSD, due to inability to start enough
# processes.
ulimit -p 256
meson test $MTEST_ARGS --num-processes ${TEST_JOBS}
EOF

Expand Down Expand Up @@ -596,7 +593,7 @@ task:
env:
CPUS: 4 # always get that much for cirrusci macOS instances
BUILD_JOBS: $CPUS
# Test performance regresses noticably when using all cores. 8 seems to
# Test performance regresses noticeably when using all cores. 8 seems to
# work OK. See
# https://postgr.es/m/20220927040208.l3shfcidovpzqxfh%40awork3.anarazel.de
TEST_JOBS: 8
Expand Down
2 changes: 1 addition & 1 deletion COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PostgreSQL Database Management System
(also known as Postgres, formerly known as Postgres95)

Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group

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

Expand Down
18 changes: 9 additions & 9 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for PostgreSQL 18.1.
# Generated by GNU Autoconf 2.69 for PostgreSQL 18.2.
#
# Report bugs to <[email protected]>.
#
Expand Down Expand Up @@ -583,8 +583,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='PostgreSQL'
PACKAGE_TARNAME='postgresql'
PACKAGE_VERSION='18.1'
PACKAGE_STRING='PostgreSQL 18.1'
PACKAGE_VERSION='18.2'
PACKAGE_STRING='PostgreSQL 18.2'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_URL='https://www.postgresql.org/'

Expand Down Expand Up @@ -1473,7 +1473,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures PostgreSQL 18.1 to adapt to many kinds of systems.
\`configure' configures PostgreSQL 18.2 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1538,7 +1538,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of PostgreSQL 18.1:";;
short | recursive ) echo "Configuration of PostgreSQL 18.2:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1733,7 +1733,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
PostgreSQL configure 18.1
PostgreSQL configure 18.2
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2486,7 +2486,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by PostgreSQL $as_me 18.1, which was
It was created by PostgreSQL $as_me 18.2, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ $0 $@
Expand Down Expand Up @@ -20246,7 +20246,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by PostgreSQL $as_me 18.1, which was
This file was extended by PostgreSQL $as_me 18.2, which was
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -20317,7 +20317,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
PostgreSQL config.status 18.1
PostgreSQL config.status 18.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dnl Read the Autoconf manual for details.
dnl
m4_pattern_forbid(^PGAC_)dnl to catch undefined macros

AC_INIT([PostgreSQL], [18.1], [[email protected]], [], [https://www.postgresql.org/])
AC_INIT([PostgreSQL], [18.2], [[email protected]], [], [https://www.postgresql.org/])

m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required.
Untested combinations of 'autoconf' and PostgreSQL versions are not
Expand Down
24 changes: 24 additions & 0 deletions contrib/amcheck/t/002_cic.pl
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,29 @@
)
});

# Test bt_index_parent_check() with indexes created with
# CREATE INDEX CONCURRENTLY.
$node->safe_psql('postgres', q(CREATE TABLE quebec(i int primary key)));
# Insert two rows into index
$node->safe_psql('postgres',
q(INSERT INTO quebec SELECT i FROM generate_series(1, 2) s(i);));

# start background transaction
my $in_progress_h = $node->background_psql('postgres');
$in_progress_h->query_safe(q(BEGIN; SELECT pg_current_xact_id();));

# delete one row from table, while background transaction is in progress
$node->safe_psql('postgres', q(DELETE FROM quebec WHERE i = 1;));
# create index concurrently, which will skip the deleted row
$node->safe_psql('postgres',
q(CREATE INDEX CONCURRENTLY oscar ON quebec(i);));

# check index using bt_index_parent_check
my $result = $node->psql('postgres',
q(SELECT bt_index_parent_check('oscar', heapallindexed => true)));
is($result, '0', 'bt_index_parent_check for CIC after removed row');

$in_progress_h->quit;

$node->stop;
done_testing();
94 changes: 41 additions & 53 deletions contrib/amcheck/verify_nbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,11 @@ typedef struct BtreeCheckState
BufferAccessStrategy checkstrategy;

/*
* Info for uniqueness checking. Fill these fields once per index check.
* Info for uniqueness checking. Fill this field and the one below once
* per index check.
*/
IndexInfo *indexinfo;
/* Table scan snapshot for heapallindexed and checkunique */
Snapshot snapshot;

/*
Expand Down Expand Up @@ -382,7 +384,6 @@ bt_check_every_level(Relation rel, Relation heaprel, bool heapkeyspace,
BTMetaPageData *metad;
uint32 previouslevel;
BtreeLevel current;
Snapshot snapshot = SnapshotAny;

if (!readonly)
elog(DEBUG1, "verifying consistency of tree structure for index \"%s\"",
Expand Down Expand Up @@ -433,54 +434,46 @@ bt_check_every_level(Relation rel, Relation heaprel, bool heapkeyspace,
state->heaptuplespresent = 0;

/*
* Register our own snapshot in !readonly case, rather than asking
* Register our own snapshot for heapallindexed, rather than asking
* table_index_build_scan() to do this for us later. This needs to
* happen before index fingerprinting begins, so we can later be
* certain that index fingerprinting should have reached all tuples
* returned by table_index_build_scan().
*/
if (!state->readonly)
{
snapshot = RegisterSnapshot(GetTransactionSnapshot());
state->snapshot = RegisterSnapshot(GetTransactionSnapshot());

/*
* GetTransactionSnapshot() always acquires a new MVCC snapshot in
* READ COMMITTED mode. A new snapshot is guaranteed to have all
* the entries it requires in the index.
*
* We must defend against the possibility that an old xact
* snapshot was returned at higher isolation levels when that
* snapshot is not safe for index scans of the target index. This
* is possible when the snapshot sees tuples that are before the
* index's indcheckxmin horizon. Throwing an error here should be
* very rare. It doesn't seem worth using a secondary snapshot to
* avoid this.
*/
if (IsolationUsesXactSnapshot() && rel->rd_index->indcheckxmin &&
!TransactionIdPrecedes(HeapTupleHeaderGetXmin(rel->rd_indextuple->t_data),
snapshot->xmin))
ereport(ERROR,
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
errmsg("index \"%s\" cannot be verified using transaction snapshot",
RelationGetRelationName(rel))));
}
/*
* GetTransactionSnapshot() always acquires a new MVCC snapshot in
* READ COMMITTED mode. A new snapshot is guaranteed to have all the
* entries it requires in the index.
*
* We must defend against the possibility that an old xact snapshot
* was returned at higher isolation levels when that snapshot is not
* safe for index scans of the target index. This is possible when
* the snapshot sees tuples that are before the index's indcheckxmin
* horizon. Throwing an error here should be very rare. It doesn't
* seem worth using a secondary snapshot to avoid this.
*/
if (IsolationUsesXactSnapshot() && rel->rd_index->indcheckxmin &&
!TransactionIdPrecedes(HeapTupleHeaderGetXmin(rel->rd_indextuple->t_data),
state->snapshot->xmin))
ereport(ERROR,
errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
errmsg("index \"%s\" cannot be verified using transaction snapshot",
RelationGetRelationName(rel)));
}

/*
* We need a snapshot to check the uniqueness of the index. For better
* performance take it once per index check. If snapshot already taken
* reuse it.
* We need a snapshot to check the uniqueness of the index. For better
* performance, take it once per index check. If one was already taken
* above, use that.
*/
if (state->checkunique)
{
state->indexinfo = BuildIndexInfo(state->rel);
if (state->indexinfo->ii_Unique)
{
if (snapshot != SnapshotAny)
state->snapshot = snapshot;
else
state->snapshot = RegisterSnapshot(GetTransactionSnapshot());
}

if (state->indexinfo->ii_Unique && state->snapshot == InvalidSnapshot)
state->snapshot = RegisterSnapshot(GetTransactionSnapshot());
}

Assert(!state->rootdescend || state->readonly);
Expand Down Expand Up @@ -555,30 +548,28 @@ bt_check_every_level(Relation rel, Relation heaprel, bool heapkeyspace,
/*
* Create our own scan for table_index_build_scan(), rather than
* getting it to do so for us. This is required so that we can
* actually use the MVCC snapshot registered earlier in !readonly
* case.
* actually use the MVCC snapshot registered earlier.
*
* Note that table_index_build_scan() calls heap_endscan() for us.
*/
scan = table_beginscan_strat(state->heaprel, /* relation */
snapshot, /* snapshot */
state->snapshot, /* snapshot */
0, /* number of keys */
NULL, /* scan key */
true, /* buffer access strategy OK */
true); /* syncscan OK? */

/*
* Scan will behave as the first scan of a CREATE INDEX CONCURRENTLY
* behaves in !readonly case.
* behaves.
*
* It's okay that we don't actually use the same lock strength for the
* heap relation as any other ii_Concurrent caller would in !readonly
* case. We have no reason to care about a concurrent VACUUM
* operation, since there isn't going to be a second scan of the heap
* that needs to be sure that there was no concurrent recycling of
* TIDs.
* heap relation as any other ii_Concurrent caller would. We have no
* reason to care about a concurrent VACUUM operation, since there
* isn't going to be a second scan of the heap that needs to be sure
* that there was no concurrent recycling of TIDs.
*/
indexinfo->ii_Concurrent = !state->readonly;
indexinfo->ii_Concurrent = true;

/*
* Don't wait for uncommitted tuple xact commit/abort when index is a
Expand All @@ -602,14 +593,11 @@ bt_check_every_level(Relation rel, Relation heaprel, bool heapkeyspace,
state->heaptuplespresent, RelationGetRelationName(heaprel),
100.0 * bloom_prop_bits_set(state->filter))));

if (snapshot != SnapshotAny)
UnregisterSnapshot(snapshot);

bloom_free(state->filter);
}

/* Be tidy: */
if (snapshot == SnapshotAny && state->snapshot != InvalidSnapshot)
if (state->snapshot != InvalidSnapshot)
UnregisterSnapshot(state->snapshot);
MemoryContextDelete(state->targetcontext);
}
Expand Down Expand Up @@ -721,7 +709,7 @@ bt_check_level_from_leftmost(BtreeCheckState *state, BtreeLevel level)
errmsg("block %u is not leftmost in index \"%s\"",
current, RelationGetRelationName(state->rel))));

if (level.istruerootlevel && !P_ISROOT(opaque))
if (level.istruerootlevel && (!P_ISROOT(opaque) && !P_INCOMPLETE_SPLIT(opaque)))
ereport(ERROR,
(errcode(ERRCODE_INDEX_CORRUPTED),
errmsg("block %u is not true root in index \"%s\"",
Expand Down Expand Up @@ -2270,7 +2258,7 @@ bt_child_highkey_check(BtreeCheckState *state,
* If we visit page with high key, check that it is equal to the
* target key next to corresponding downlink.
*/
if (!rightsplit && !P_RIGHTMOST(opaque))
if (!rightsplit && !P_RIGHTMOST(opaque) && !P_ISHALFDEAD(opaque))
{
BTPageOpaque topaque;
IndexTuple highkey;
Expand Down
Loading