pgBackRest 2.70 commit log

v2.60.1: Annotate and SFTP Fixes

commit   : 7aeba299c49abd768ca741506569007a5cab0870    
  
author   : David Steele <david@pgbackrest.org>    
date     : Mon, 16 Nov 2026 08:49:15 -0300    
  
committer: David Steele <david@pgbackrest.org>    
date     : Mon, 16 Nov 2026 08:49:15 -0300    

Click here for diff

Bug Fixes:  
  
* Fix annotate saving backup.info to the default repository. (Reviewed by Stefan Fercot, Douglas J Hunley.)  
* Fix possible block incremental restore failure on SFTP storage. (Reviewed by Douglas J Hunley. Reported by Fineline19.)  
* Fix use of SFTP file handles after a reconnect. (Reviewed by Douglas J Hunley.)  
* Fix excessive memory use by the memory context free list. (Fixed by Vasiliy Koshkin. Reviewed by David Steele, Douglas J Hunley.)  
* Do not lower a minimum TLS version set by the OpenSSL config. (Reviewed by Douglas J Hunley, Stefan Fercot.)  
* Fix reporting of OpenSSL errors. (Reviewed by Douglas J Hunley, Stefan Fercot.)  
  
Documentation Improvements:  
  
* Document TLS settings skipped when repo-storage-verify-tls=n.  

M CONTRIBUTING.md
M README.md
M doc/resource/exe.cache
M doc/xml/auto/metric-coverage-report.auto.xml
M doc/xml/news.xml
M doc/xml/release/2020s/2026/2.59.2.xml
M doc/xml/release/2020s/2026/2.60.1.xml
M meson.build
M src/version.h

End patch release note history at the integration-x.y.z-ci branch.

commit   : 01c600c629ff65f4931d7c74c454f8b72462097f    
  
author   : David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 17:13:33 -0300    
  
committer: David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 17:13:33 -0300    

Click here for diff

The release notes are checked against git history that ends at the newest commit of HEAD that is also in integration. A patch release is built on a branch created from the prior release so the history ended at the prior release and the build failed with "no commits found" for the patch release.  
  
When PROJECT_VERSION_PATCH != 0 only the local integration-x.y.z-ci branch is tried, e.g. integration-2.60.1-ci. The history ends at the newest commit of HEAD that is also in that branch so commits made only on a test branch are left out, and every commit in it must be claimed by a release note item. Without that branch the history ends at HEAD and the claim check is skipped.  
  
Document the branch names for a patch release in RELEASE.md.  

M doc/RELEASE.md
M doc/lib/command/render/release.py
M doc/xml/release/2020s/2026/2.60.1.xml
M test/src/module/doc/command/render/release_test.py

New CI container builds.

commit   : 9d10dab7ae2c44b0d2f1d3e8426c4743012fcb40    
  
author   : David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 16:06:36 -0300    
  
committer: David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 16:06:36 -0300    

Click here for diff

Rebuild all containers to include the latest PostgreSQL minor releases and PostgreSQL 19rc2. The u24 overrides are removed so u24 uses the "all" revision again.  

M doc/xml/release/2020s/2026/2.60.1.xml
M test/container.yaml

Fix excessive memory use by the memory context free list.

commit   : 8173be12b4a336338df7754ee7498930cbea01e9    
  
author   : Vasiliy Koshkin <61789920+melancholictheory@users.noreply.github.com>    
date     : Fri, 13 Nov 2026 13:27:21 -0300    
  
committer: David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 13:27:21 -0300    

Click here for diff

The free list retained freed allocations of at least 64KiB in buckets keyed by exact size. A buffer that grows with memResize() was never taken from the list but was added to it when freed so the object store chunk buffer filled its bucket. Exact-size copies that did not repeat, e.g. the last part of a multi-part upload, were also retained until evicted. Each process could retain up to 64MiB and in testing a 16 process archive-push peaked at 1212MiB compared to 400MiB without the free list. When the list was full the I/O buffers it was intended for could not be retained.  
  
Retain only allocations of the size set by memContextFreeListReserve(), i.e. the I/O buffer size. The limits of eight blocks and 64MiB per process remain.  

M doc/xml/release/2020s/2026/2.60.1.xml
M doc/xml/release/contributor.xml
M src/common/memContext.c
M src/common/memContext.h
M src/main.c
M test/src/module/common/memContextTest.c

Fix annotate saving backup.info to the default repository.

commit   : 7e85613080ac66effda6392b0e2604739a5bc310    
  
author   : David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 13:24:54 -0300    
  
committer: David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 13:24:54 -0300    

Click here for diff

When the repo option was not specified, annotate searched each repository for the backup set but saved the updated backup.info to the default repository. Annotating a backup set that was not in the default repository overwrote the backup.info of the default repository with the backup.info of the repository where the backup set was found. If the default repository was encrypted, the key required to read its backups was lost, so those backups could no longer be restored.  
  
Save backup.info to the repository it was loaded from.  

M doc/xml/release/2020s/2026/2.60.1.xml
M src/command/annotate/annotate.c
M test/src/module/command/annotateTest.c

Remove stale files from site paths written by the documentation build.

commit   : 8cf262c9dad7c7729f7d29f0dd6c0c8297036e5d    
  
author   : David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 13:22:47 -0300    
  
committer: David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 13:22:47 -0300    

Click here for diff

The website deploy removed files the build did not write only from the top level of the site, so files in paths such as sponsor remained after they were removed from the build.  
  
Remove files the build did not write from each path the build writes, using the same logic already applied to the prior version path.  

M doc/release.py
M doc/xml/release/2020s/2026/2.60.1.xml

Prevent use of SFTP handles after a reconnect.

commit   : 0a1a924dc1a68272ec9ece181c6c9128f27638fc    
  
author   : David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 13:17:59 -0300    
  
committer: David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 13:17:59 -0300    

Click here for diff

A reconnect frees the libssh2 session while other handles may still be open on it and the next use of one of those handles reads freed memory. For example, a block incremental restore holds the next file's handle open in the multi-read while super blocks are read so a lost connection detected when opening a super block read leaves that handle invalid.  
  
Add a connection id to the SFTP storage that is incremented when the session is freed and store it when a file is opened. A read or write on a handle from a lost connection now throws an error, which allows the job to be retried. Closing such a read is skipped. Closing such a write throws an error because the written data may not have reached the server.  
  
Writes need the check because the remote process does all reads and writes through one storage object so a read open can reconnect while a bundle write is open.  

M doc/xml/release/2020s/2026/2.60.1.xml
M src/storage/sftp/read.c
M src/storage/sftp/storage.c
M src/storage/sftp/storage.intern.h
M src/storage/sftp/write.c
M test/src/module/storage/sftpTest.c

Close block incremental super block reads during restore.

commit   : 01a2575828e81dc3237ca68f4752665c8e0ef2ad    
  
author   : David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 13:16:05 -0300    
  
committer: David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 13:16:05 -0300    

Click here for diff

Super block reads were freed without being closed. The SFTP read driver only closes its handle on an explicit close, so each read left a handle open on the server until the session ended and a restore could reach the server's open file limit.  
  
The failed open then triggers a reconnect. Since e63dec323 the multi-read holds the next file's handle open while super blocks are read, so that handle belongs to a freed session after the reconnect. The next read from it uses freed memory and the restore fails.  
  
Close the read before freeing it.  

M doc/xml/release/2020s/2026/2.60.1.xml
M doc/xml/release/contributor.xml
M src/command/restore/file.c.inc

Do not lower a minimum TLS version set by the OpenSSL config.

commit   : 18ca629b829cdc315b2cc19240940051599015e3    
  
author   : David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 13:14:15 -0300    
  
committer: David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 13:14:15 -0300    

Click here for diff

tlsContext() set the minimum TLS version to 1.2 after SSL_CTX_new() had applied the OpenSSL config. This lowered a higher minimum such as MinProtocol = TLSv1.3 so TLSv1.2 connections were still allowed.  
  
Set the minimum only when the minimum from the OpenSSL config is lower than TLSv1.2.  

M doc/xml/release/2020s/2026/2.60.1.xml
M src/common/io/tls/common.c
M test/src/module/common/io/tlsTest.c

Fix reporting of OpenSSL errors.

commit   : 382c8d2937a4197a2188860426c210df89ae577c    
  
author   : David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 13:11:44 -0300    
  
committer: David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 13:11:44 -0300    

Click here for diff

cryptoError() reports the oldest error on the OpenSSL error queue so an error left on the queue was reported instead of the actual failure. Errors could be left on the queue in three ways.  
  
Loading the OpenSSL config can queue errors, e.g. when config_diagnostics = 1 and an ssl_conf entry names a missing section. An invalid tls-cipher-12 value then reported "ssl command section not found" instead of "invalid command". Clear the queue after initialization. A config that fails to load is still not an error.  
  
SSL_CTX_new() applies the system_default section of the OpenSSL config and can queue errors when a setting is invalid, even when it returns a context. For example, with OpenSSL 3.0.13, Groups = nosuchgroup in the config, and an invalid tls-cipher-12 value, the error was "passed invalid argument" instead of "no cipher match". Clear the queue after the context is created.  
  
A failed call can queue more than one error, e.g. three for a missing CA file, and cryptoError() read only the oldest. The next cryptoError() in the same process reported a leftover error, e.g. the info command reported different errors for two repositories with missing CA files. Clear the queue after reading an error.  
  
Also report the message for system errors. ERR_reason_error_string() returns NULL for system errors in OpenSSL >= 3.0 so errors such as a missing CA, certificate, or key file reported "no details available". Get the message from strerror() instead.  

M doc/xml/release/2020s/2026/2.60.1.xml
M src/common/crypto/common.c
M src/common/io/tls/common.c
M test/src/module/common/cryptoTest.c
M test/src/module/common/io/tlsTest.c

Document TLS settings skipped when repo-storage-verify-tls=n.

commit   : 4457d84d89d6dd8a7717dd2872d89df4af302b83    
  
author   : David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 12:34:53 -0300    
  
committer: David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 12:34:53 -0300    

Click here for diff

When repo-storage-verify-tls=n the TLSv1.2 minimum is not set and the tls-cipher-12 and tls-cipher-13 options are ignored for repository storage connections. Document this in repo-storage-verify-tls and qualify the note in tls-cipher-12 and tls-cipher-13 that TLSv1.2 is the absolute minimum for any transport connection.  
  
Rename repo-storage-verify-tls from "Repository Storage Certificate Verify" to "Repository Storage TLS Verify" since it affects more than certificate verification.  

M doc/xml/reference.xml
M doc/xml/release/2020s/2026/2.60.1.xml
M test/src/module/command/helpTest.c

Begin v2.60.1 development.

commit   : b212592ef37078a51dc5b296f10b5dbf84669173    
  
author   : David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 11:58:29 -0300    
  
committer: David Steele <david@pgbackrest.org>    
date     : Fri, 13 Nov 2026 11:58:29 -0300    

Click here for diff

M doc/xml/release.xml
A doc/xml/release/2020s/2026/2.60.1.xml
M meson.build
M src/version.h