Make _bt_killitems drop pins it acquired itself.
commit : 7c319f54917faf564b660fe9027c4835a422bad6
author : Peter Geoghegan <pg@bowt.ie>
date : Wed, 11 Jun 2025 09:17:35 -0400
committer: Peter Geoghegan <pg@bowt.ie>
date : Wed, 11 Jun 2025 09:17:35 -0400
Click here for diff
Teach nbtree's _bt_killitems to leave the so->currPos page that it sets
LP_DEAD items on in whatever state it was in when _bt_killitems was
called. In particular, make sure that so->dropPin scans don't acquire a
pin whose reference is saved in so->currPos.buf.
Allowing _bt_killitems to change so->currPos.buf like this is wrong.
The immediate consequence of allowing it is that code in _bt_steppage
(that copies so->currPos into so->markPos) will behave as if the scan is
a !so->dropPin scan. so->markPos will therefore retain the buffer pin
indefinitely, even though _bt_killitems only needs to acquire a pin
(along with a lock) for long enough to mark known-dead items LP_DEAD.
This issue came to light following a report of a failure of an assertion
from recent commit e6eed40e. The test case in question involves the use
of mark and restore. An initial call to _bt_killitems takes place that
leaves so->currPos.buf in a state that is inconsistent with the scan
being so->dropPin. A subsequent call to _bt_killitems for the same
position (following so->currPos being saved in so->markPos, and then
restored as so->currPos) resulted in the failure of an assertion that
tests that so->currPos.buf is InvalidBuffer when the scan is so->dropPin
(non-assert builds got a "resource was not closed" WARNING instead).
The same problem exists on earlier releases, though the issue is far
more subtle there. Recent commit e6eed40e introduced the so->dropPin
field as a partial replacement for testing so->currPos.buf directly.
Earlier releases won't get an assertion failure (or buffer pin leak),
but they will allow the second _bt_killitems call from the test case to
behave as if a buffer pin was consistently held since the original call
to _bt_readpage. This is wrong; there will have been an initial window
during which no pin was held on the so->currPos page, and yet the second
_bt_killitems call will neglect to check if so->currPos.lsn continues to
match the page's now-current LSN.
As a result of all this, it's just about possible that _bt_killitems
will set the wrong items LP_DEAD (on release branches). This could only
happen with merge joins (the sole user of nbtree mark/restore support),
when a concurrently inserted index tuple used a recently-recycled TID
(and only when the new tuple was inserted onto the same page as a
distinct concurrently-removed tuple with the same TID). This is exactly
the scenario that _bt_killitems' check of the page's now-current LSN
against the LSN stashed in currPos was supposed to prevent.
A follow-up commit will make nbtree completely stop conditioning whether
or not a position's pin needs to be dropped on whether the 'buf' field
is set. All call sites that might need to drop a still-held pin will be
taught to rely on the scan-level so->dropPin field recently introduced
by commit e6eed40e. That will make bugs of the same general nature as
this one impossible (or make them much easier to detect, at least).
Author: Peter Geoghegan <pg@bowt.ie>
Reported-By: Alexander Lakhin <exclusion@gmail.com>
Discussion: https://postgr.es/m/545be1e5-3786-439a-9257-a90d30f8b849@gmail.com
Backpatch-through: 13
M src/backend/access/nbtree/nbtree.c
M src/backend/access/nbtree/nbtutils.c
Stamp 13.21.
commit : 8b3c5d9f5299666e2c548cc6e18d837d52f2ab2e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 16:34:49 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 16:34:49 -0400
Click here for diff
M configure
M configure.in
Last-minute updates for release notes.
commit : 5dff5ce8636660772f23493918e69af91c820321
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 11:29:49 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 11:29:49 -0400
Click here for diff
Stamp 14.18.
commit : 8bde80e30edd408a5bef4d5612db0bb173206293
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 16:33:27 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 16:33:27 -0400
Click here for diff
M configure
M configure.ac
Last-minute updates for release notes.
commit : d9cee6a5f2ad73e1c13b619fdc2d42961079dbc3
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 11:29:49 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 11:29:49 -0400
Click here for diff
Stamp 15.13.
commit : 5261b40acb67fdb8ed1e5976ae99599f16864c93
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 16:31:49 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 16:31:49 -0400
Click here for diff
M configure
M configure.ac
Last-minute updates for release notes.
commit : 4b6f246b6791904b16d277138800a3f8a4ece847
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 11:29:49 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 11:29:49 -0400
Click here for diff
Stamp 16.9.
commit : 6e4ab1b69197e2756192a1019439aebacdea5497
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 16:30:08 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 16:30:08 -0400
Click here for diff
M configure
M configure.ac
M meson.build
Last-minute updates for release notes.
commit : ce12d66ce731a863abb489dfb9b3f01a4537ee73
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 11:29:49 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 11:29:49 -0400
Click here for diff
Stamp 17.5.
commit : 5e2f3df49d4298c6097789364a5a53be172f6e85
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 16:28:35 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 16:28:35 -0400
Click here for diff
M configure
M configure.ac
M meson.build
Last-minute updates for release notes.
commit : ecbe349e9128b678311a2b8e328cbe258d7807ed
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 11:29:49 -0400
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 5 May 2025 11:29:49 -0400
Click here for diff
v2.55.1: Bug Fixes
commit : 665f261ea4e8a89d116a22e9fb5ad12676665622
author : David Steele <david@pgbackrest.org>
date : Mon, 5 May 2025 13:10:22 -0400
committer: David Steele <david@pgbackrest.org>
date : Mon, 5 May 2025 13:10:22 -0400
Click here for diff
Bug Fixes:
* Revert "calculate content-md5 on S3 only when required". (Reviewed by David Christensen. Reported by Frank Brendel.)
* Fix lower bounds checking for option keys. (Reviewed by David Christensen, Wolfgang Walther. Reported by Wolfgang Walther.)
M CONTRIBUTING.md
M README.md
M doc/resource/exe.cache
M doc/resource/git-history.cache
M doc/xml/auto/metric-coverage-report.auto.xml
M doc/xml/release/2025/2.55.1.xml
M meson.build
M src/version.h
M test/code-count/file-type.yaml
v2.55.0: Verification Improvements and PostgreSQL 18 Support
commit : 6c90196e74ef0da38568f08fd7cb234d10130e79
author : David Steele <david@pgbackrest.org>
date : Mon, 21 Apr 2025 18:25:00 -0400
committer: David Steele <david@pgbackrest.org>
date : Mon, 21 Apr 2025 18:25:00 -0400
Click here for diff
Bug Fixes:
* Fix block incremental restore issue on non-default repository. (Reviewed by David Christensen, Aleksander Łukasz. Reported by Aleksander Łukasz.)
* Do not set recovery_target_timeline=current for PostgreSQL < 12. (Reviewed by Stefan Fercot.)
* Fix expire archive range logging. (Reviewed by Stefan Fercot. Reported by Aleš Zelený.)
* Fix error reporting for queries with no results. (Reviewed by Stefan Fercot. Reported by Susantha Bathige.)
Features:
* Verify recovery target timeline. (Reviewed by Stefan Fercot.)
* Allow verification of a specified backup. (Contributed by Maxim Michkov. Reviewed by David Steele.)
* Add support for S3/GCS requester pays. (Contributed by Timothée Peignier. Reviewed by David Steele.)
* PostgreSQL 18 experimental support. (Reviewed by Stefan Fercot.)
* Allow connections to PostgreSQL on abstract domain sockets. (Reviewed by Chris Bandy. Suggested by Chris Bandy.)
* Add numeric output to version command. (Contributed by Stefan Fercot. Reviewed by David Steele.)
Improvements:
* Allow backup command to operate on remote repositories. (Reviewed by Stefan Fercot.)
* Use lz4 for protocol compression. (Reviewed by Stefan Fercot.)
* Calculate content-md5 on S3 only when required. (Reviewed by David Christensen.)
* Warn when a value for a multi-key option is overwritten. (Reviewed by David Christensen, Stefan Fercot.)
* Add detail logging for expired archive path. (Contributed by Stefan Fercot. Reviewed by David Steele.)
* Remove support for PostgreSQL 9.4. (Reviewed by Stefan Fercot.)
* Remove autoconf/make build. (Reviewed by David Christensen.)
Documentation Improvements:
* Fix documentation for specifying multiple stanzas with tls-server-auth. (Reviewed by David Christensen, Stefan Fercot. Suggested by Terry MacAndrew.)
* Clarify incremental backup expiration. (Reviewed by Stefan Fercot.)
* Clarify requirement for local/remote pgBackRest versions to match. (Contributed by Greg Clough. Reviewed by David Steele.)
* Add FAQ about exporting self-contained cluster. (Contributed by Stefan Fercot. Reviewed by David Steele.)
* Caveat --tablespace-map-all regarding tablespace creation. (Reviewed by Stefan Fercot, Christophe Courtois. Suggested by Christophe Courtois.)
* Clarify behavior of --repo-retention-full-type. (Reviewed by Antoine Beaupré. Suggested by Antoine Beaupré.)
* Change --process-max recommendation for object stores to --repo-bundle. (Reviewed by Stefan Fercot.)
* Update unix_socket_directory to unix_socket_directories. (Contributed by hyunkyu han. Reviewed by David Steele.)
* Recommend not placing spool-path within pg_xlog/pg_wal. (Reviewed by Martín Marqués, Don Seiler. Suggested by Martín Marqués.)
M CONTRIBUTING.md
M README.md
M doc/RELEASE.md
M doc/resource/exe.cache
M doc/resource/git-history.cache
M doc/xml/auto/metric-coverage-report.auto.xml
M doc/xml/release/2025/2.55.0.xml
M meson.build
M src/version.h
M test/code-count/file-type.yaml
Stamp 1.5.3.
commit : b5e3d92c56e2cbfa95329e35ebd43da8f1ff667e
author : David Steele <david@pgbackrest.org>
date : Wed, 19 Feb 2025 13:58:09 -0600
committer: David Steele <david@pgbackrest.org>
date : Wed, 19 Feb 2025 13:58:09 -0600
Click here for diff
M Makefile
A pgaudit–1.5.2–1.5.3.sql
R100 pgaudit–1.5.2.sql pgaudit–1.5.3.sql
M pgaudit.control
Add exception for call statement to stack check.
commit : a4547309100ebd75e48d6a7958c07bc2cf2268de
author : Alper Kocatas <alperkocatas@gmail.com>
date : Tue, 18 Feb 2025 20:42:47 +0300
committer: David Steele <david@pgbackrest.org>
date : Tue, 18 Feb 2025 20:42:47 +0300
Click here for diff
Stamp 1.6.3.
commit : abdb653a57228c28c52600aefa4852616eb6b0af
author : David Steele <david@pgbackrest.org>
date : Wed, 19 Feb 2025 13:53:15 -0600
committer: David Steele <david@pgbackrest.org>
date : Wed, 19 Feb 2025 13:53:15 -0600
Click here for diff
M Makefile
A pgaudit–1.6.2–1.6.3.sql
R100 pgaudit–1.6.2.sql pgaudit–1.6.3.sql
M pgaudit.control
Add exception for call statement to stack check.
commit : ff66faa6fc3dbbf236357171eda05e9a322276c7
author : Alper Kocatas <alperkocatas@gmail.com>
date : Tue, 18 Feb 2025 20:42:47 +0300
committer: David Steele <david@pgbackrest.org>
date : Tue, 18 Feb 2025 20:42:47 +0300
Click here for diff
Stamp 13.20.
commit : c8f198c3acb59ed858b5b9b88b4fbc55cece544e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 17 Feb 2025 16:17:13 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 17 Feb 2025 16:17:13 -0500
Click here for diff
M configure
M configure.in
Translation updates
commit : a282099583039633a8aa83953a0c4e72fca95423
author : Álvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 17 Feb 2025 17:51:30 +0100
committer: Álvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 17 Feb 2025 17:51:30 +0100
Click here for diff
Stamp 14.17.
commit : e5cabe28006995d90cc9ebc613dad072c44c7f4a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 17 Feb 2025 16:15:49 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 17 Feb 2025 16:15:49 -0500
Click here for diff
M configure
M configure.ac
Translation updates
commit : 50fabe48e39858eacf8a56e0da1ba7610ae537ae
author : Álvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 17 Feb 2025 17:51:30 +0100
committer: Álvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 17 Feb 2025 17:51:30 +0100
Click here for diff
Stamp 15.12.
commit : 50d3d22baba63613d1f1406b2ed460dc9b03c3fc
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 17 Feb 2025 16:14:22 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 17 Feb 2025 16:14:22 -0500
Click here for diff
M configure
M configure.ac
Translation updates
commit : f815362abecde1aebcd9ddb334fe271edc759eaa
author : Álvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 17 Feb 2025 17:51:30 +0100
committer: Álvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 17 Feb 2025 17:51:30 +0100
Click here for diff
Stamp 16.8.
commit : 71eb35c0b18de96537bd3876ec9bf8075bfd484f
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 17 Feb 2025 16:13:08 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 17 Feb 2025 16:13:08 -0500
Click here for diff
M configure
M configure.ac
M meson.build
Translation updates
commit : 3b5b99f6f14567396555b6c24a14111f81161e60
author : Álvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 17 Feb 2025 17:51:30 +0100
committer: Álvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 17 Feb 2025 17:51:30 +0100
Click here for diff
Stamp 17.4.
commit : f8554dee417ffc4540c94cf357f7bf7d4b6e5d80
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 17 Feb 2025 16:11:21 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 17 Feb 2025 16:11:21 -0500
Click here for diff
M configure
M configure.ac
M meson.build
Translation updates
commit : d0ed7d2a5aeb858e814147b42f8681870340909b
author : Álvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 17 Feb 2025 17:51:30 +0100
committer: Álvaro Herrera <alvherre@alvh.no-ip.org>
date : Mon, 17 Feb 2025 17:51:30 +0100
Click here for diff
Stamp 13.19.
commit : bf5710d3b6656516d828ebe9f6e2ffd49e54d084
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:28:20 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:28:20 -0500
Click here for diff
M configure
M configure.in
Last-minute updates for release notes.
commit : fa3ddd2ea8d62518f1f523027c55655856d5cc39
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:16:25 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:16:25 -0500
Click here for diff
Stamp 14.16.
commit : 6884202705699820ec9427d1fba7eeba0e2de03e
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:26:37 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:26:37 -0500
Click here for diff
M configure
M configure.ac
Last-minute updates for release notes.
commit : e748064669f40a2dc9cf29b8518902620e47e2db
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:16:25 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:16:25 -0500
Click here for diff
Stamp 15.11.
commit : e3cbae2221c8107fa816673adaea4e357c1393df
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:24:55 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:24:55 -0500
Click here for diff
M configure
M configure.ac
Last-minute updates for release notes.
commit : 1c77ff9f9a0278bb23b3629417ed7ce097c1697a
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:16:25 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:16:25 -0500
Click here for diff
Stamp 16.7.
commit : 61f3dcf2d9f7e2957753a00a5d932eca98b36f64
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:23:16 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:23:16 -0500
Click here for diff
M configure
M configure.ac
M meson.build
Last-minute updates for release notes.
commit : 7e06ffbc6230a6f3e4cdc7599a5617d081d611f7
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:16:25 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:16:25 -0500
Click here for diff
Stamp 17.3.
commit : 3819b30c4c5bbb4e772a6f209fa7bbccccb91a11
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:21:12 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:21:12 -0500
Click here for diff
M configure
M configure.ac
M meson.build
Last-minute updates for release notes.
commit : 1ea6e890b225fa45911f58602b8c425ae0581897
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:16:25 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 10 Feb 2025 18:16:25 -0500
Click here for diff
v2.54.2: Bug Fix
commit : 962346080f859535b9b6395bb34d2d0da9c04684
author : David Steele <david@pgbackrest.org>
date : Mon, 20 Jan 2025 10:18:27 -0500
committer: David Steele <david@pgbackrest.org>
date : Mon, 20 Jan 2025 10:18:27 -0500
Click here for diff
Bug Fixes:
* Fix issue after disabling bundling with block incremental enabled. (Reviewed by David Christensen.)
Documentation Improvements:
* Clarify behavior of multiple configuration files. (Reviewed by Paul Bierly. Suggested by Paul Bierly.)
M CONTRIBUTING.md
M README.md
M doc/resource/exe.cache
M doc/resource/git-history.cache
M doc/xml/release/2025/2.54.2.xml
M meson.build
M src/build/configure.ac
M src/configure
M src/version.h
M test/code-count/file-type.yaml
v2.54.1: Bug Fix
commit : 9b72bfd9b2d63aef346c0f696c4913beb02afd65
author : David Steele <david@pgbackrest.org>
date : Mon, 16 Dec 2024 10:41:06 -0500
committer: David Steele <david@pgbackrest.org>
date : Mon, 16 Dec 2024 10:41:06 -0500
Click here for diff
Bug Fixes:
* Fix issue with version/help commands attempting to load pgbackrest.conf. (Reviewed by Stefan Fercot. Reported by Bradford Boyle, Julian.)
Test Suite Improvements:
* Stabilize async archiving in integration tests. (Contributed by Viktor Kurilko. Reviewed by David Steele.)
M CONTRIBUTING.md
M README.md
M doc/resource/exe.cache
M doc/resource/git-history.cache
M doc/xml/auto/metric-coverage-report.auto.xml
M doc/xml/release/2024/2.54.1.xml
M meson.build
M src/build/configure.ac
M src/configure
M src/version.h
M test/code-count/file-type.yaml
Stamp 12.22.
commit : 498f30a8b7025a2a7bd3715acc1d1692122ba542
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 18 Nov 2024 15:41:03 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Mon, 18 Nov 2024 15:41:03 -0500
Click here for diff
M configure
M configure.in
M src/include/pg_config.h.win32
M src/interfaces/libpq/libpq.rc.in
M src/port/win32ver.rc
Release notes for 17.2, 16.6, 15.10, 14.15, 13.18, 12.22.
commit : c4b39f26dc881d6496561f87c43a04c6dc1ba12f
author : Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 16 Nov 2024 17:10:08 -0500
committer: Tom Lane <tgl@sss.pgh.pa.us>
date : Sat, 16 Nov 2024 17:10:08 -0500
Click here for diff