1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-04-26 21:02:59 +02:00

4806 Commits

Author SHA1 Message Date
Will Morland 77312b33ba Add per-repo backup progress to info command output.
When backups are running on multiple repositories simultaneously, the info command now reports per-repo progress in addition to the existing overall progress. A new repo array is included in JSON output for backup locks. This avoids confusing progress jumps when one repo finishes before another.
2026-04-14 14:51:42 +07:00
David Steele ce8bb04d5b Limit CI permissions on the repository to read. 2026-04-14 12:40:33 +07:00
David Steele 2ef8673534 Remove CodeQL CI job.
This job has never surfaced any useful data and now it is failing, so remove it.

It appears that CodeQL can now be automated directly within the Github interface, so that seems like a better route if we decide to reenable it.
2026-04-14 12:34:32 +07:00
David Steele afd6939656 Allow FreeBSD tests to continue running even if one fails. 2026-04-13 18:22:49 +07:00
David Steele c823ce2f7c Update GitHub Actions versions. 2026-04-13 18:19:41 +07:00
David Steele 45987413d3 Migrate Cirrus CI tests to Github Actions.
Cirrus CI is shutting down on June 1 so migrate all tests. This could have been done before, probably, but it was not clear how to run FreeBSD on Github Actions. The cross-platforms-actions action solves that problem.

Fix a couple of minor test issues found on MacOS.

Also remove the dead make-cmd option. This has not been valid since the migration to meson.
2026-04-13 18:11:36 +07:00
David Steele d3cdff17f5 Migrate documentation block rendering to C.
This also requires a fair amount of support code that cannot be removed from Perl yet.
2026-04-10 13:26:21 +07:00
David Steele ff69fcb671 Remove obsolete Perl code. 2026-04-07 10:20:29 +07:00
Denis Garsh 7f82fb6635 Add backup.info checks to verify command.
Verify currently checks only backup directories present in the repository and does not validate consistency with backup.info. As a result, discrepancies between the repo contents and backup.info may go unnoticed.

Warn if a backup directory exists but is not described in backup.info. Warn if a backup is listed in backup.info but missing on disk. Add backups found only in backup.info (but not on disk) to the processing list so that verify command reports their status as manifest missing.
2026-03-30 16:39:44 +07:00
Denis Garsh 6704ffacfb Test changes in preparation for additional verification of backup.info. 2026-03-24 15:04:52 +07:00
Yegor 6e4f10203f Remove unused backtrace-supported.h include.
This header is only useful for autoconf builds and in any case it was not being used correctly.
2026-03-23 11:22:25 +07:00
Yegor Zhmak 0885374549 Add alternate error to common/io/tls test module for WSL. 2026-03-23 10:44:57 +07:00
David Steele e54b4a42fd Move archiveAsyncExec() to command/command module and rename.
Spawning an async process is useful for more than archive-get/push so move the function to a module used by all commands.
2026-03-17 11:46:33 +07:00
David Steele 9016b362fc Comment out unused CSS elements.
These are useful to denote elements that could be styled but currently work with defaults. However, CSS linters dislike empty rules so comment them out. This was already done with some rules but not followed consistently.
2026-03-07 21:46:15 +07:00
David Steele 6d7ddc3e0a Add support for sponsors in the documentation.
This allows logos to be displayed for sponsors in HTML on the homepage.

The markdown will continue to list sponsors in text but the list will be pulled from the new XML.
2026-03-07 15:35:11 +07:00
David Steele 4397d12247 Remove FreeBSD 13 and add FreeBSD 15 to Cirrus CI.
FreeBSD 13 will be EOL soon after the next release.
2026-03-04 21:37:13 +07:00
David Steele 8e711d40cb Update Fedora test image to Fedora 43. 2026-03-04 20:15:55 +07:00
David Steele 9bb26a5065 Update PostgresQL versions in user guide.
PostgreSQL 13 is EOL and no longer available in the yum.postgresql.org repository.

Update the base and upgrade versions of the RHEL and Debian documentation to better cover supported versions.
2026-03-04 17:16:18 +07:00
David Steele 4a2008c6ed Ensure backup-timestamp-start is non-zero in unit tests.
The unit tests do not require this field to be non-zero so in general it has not been set.

However, in production this field is always set and can be used to calculate timestamp deltas, which will be useful in a future commit.

Commit the test changes separately to show that there is no change in behavior.
2026-02-23 16:51:21 +07:00
David Steele b908d5e2c5 Improve seek performance during block incremental delta restore.
The prior code issued a seek for each block even if the file was in the correct position. The extra call to lseek() was probably not too expensive but a flush was also required in case of a seek on the next loop. Flushing the write buffer after each block (which is often 8KiB) was definitely wasteful.

Fix this by adding seek to the IoWrite interface. That means the file position can be tracked and calls to seek/flush are only done when needed.

Seek during write is only used in PGDATA during restore so seek functionality is only added to the Posix driver.
2026-02-21 08:37:31 +07:00
David Steele 009644b443 Update always_inline to __always_inline__.
This is the preferred syntax to avoid conflict with user-defined macros.
2026-02-20 17:56:30 +07:00
David Steele 2c747f277e Add meson check for __builtin_types_compatible_p().
This check was lost in the migration from autoconf which means that the UNCONSTIFY() macros has not been enforcing since then.

Add the check so UNCONSTIFY() enforces as expected.
2026-02-20 13:14:01 +07:00
Yegor Zhmak fc42e85d8c Fix incorrect postgres/interface unit test title. 2026-02-19 22:53:52 +07:00
David Steele 119c089ccc Update uncrustify to recognize .c.inc files.
But ignore .auto.c.inc and .vendor.c.inc files.
2026-02-19 22:33:05 +07:00
David Steele 1ce2522e35 Refactor info/manifest module into included modules.
Similar to 1db52ef9 break up this module to make it more maintainable.
2026-02-19 22:28:36 +07:00
David Steele 27fff599ee Move info/manifest.c to info/manifest/manifest.c.
This module will be split up so move it to its own path first.
2026-02-19 22:23:01 +07:00
David Steele cf003f67e7 Move static build defines to build.h.
Putting these defines in meson.build is a bit annoying because of the added syntax and double commenting. Since the defines are static there is no good reason to have them there.

This also creates a place for test builds to add global defines -- again rather than in meson.build.
2026-02-17 15:05:33 +07:00
David Steele b9eb7f8113 Fix test error message typos and add error details. 2026-02-16 10:00:35 +07:00
David Steele 27319dde50 Explicitly free block map read in restoreFile().
This will be freed when the current file is complete but freeing it before the write is opened saves memory.
2026-02-16 09:03:39 +07:00
David Steele 17db234f1b Reverse sort order in backup and restore comparators.
Both of these lists were sorted descending so all comparisons in the comparator had to be reversed. This made it hard to reason about sort order.

It makes more sense to sort ascending and have the comparisons also be ascending. The final sort order remains the same.
2026-02-14 12:57:35 +07:00
David Steele 1db52ef9f3 Refactor restore module into included modules.
The restore module has been large and unwieldy for some time but I have been loathe to split it into separate compilation units because it means maintaining additional header files, updating build files, and losing optimizations from static functions. These functions are only used internally by restore and it seems wasteful to extern them.

We already have a number of cases where C files are included directly into other C files, especially .vendor.c.inc and .auto.c.inc files. We also include C files to add functionality needed for build/doc/test to core objects without having to add that functionality to core. See src/build/common/string.c for an example.

The test/coverage code already supports C includes but I had to update it to recognize the new extension.
2026-02-13 10:20:47 +07:00
David Steele bc3ef20679 Move initialization of StorageRead and StorageWrite to interface.
Moving initialization to the interface consolidates code and removes duplication in the drivers. This will become critical as the interface manipulates multiple drivers to improve performance.

This refactor is less important for StorageWrite but it seems better to keep them consistent.
2026-02-09 22:23:40 +07:00
David Steele 8d59a6f67e Remove package build testing.
This made sense during the days when the project was juggling Perl code, a C binary, and a C library. These days the build is far simpler and this dependency just means build failures when salsa.debian.org is cranky (often) without any apparent benefit.
2026-02-08 17:39:14 +07:00
David Steele 6079651443 Minor memory context optimization in restoreFile().
The temp mem context block was outside the if statement that determines if a file needs to be copied or not, which meant that some mem contexts would never be used.

Reverse this order to avoid creating unused mem contexts.
2026-02-07 17:01:32 +07:00
David Steele 06b99d93dc Calculate limit for Posix/SFTP during read instead of when created.
This was not a bug since the Posix/SFTP drivers do not allow read retries but it could easily turn into a bug if retries are enabled in the future so it seems safer to move the logic to a location that will work with retries.
2026-02-07 13:19:08 +07:00
David Steele e11fe39d0b Improve designated initializers in data arrays.
Designated initializers were being used to initialize the structs but not the arrays. Adding designated initializers makes the code a little clearer.

In the packTypeMapData array designated initializers also allow removal of the explicit zero padding and make initialization order unimportant (though it is better to keep them in order to match the enum).
2026-02-01 11:35:05 +07:00
David Steele 10d18be719 Fix comments in common/pack module. 2026-02-01 11:23:41 +07:00
David Steele 449529f98f Fix typo in NEWS.md. 2026-01-30 08:18:06 +07:00
David Steele b8b0dbceb3 Fix float-equal compiler warnings.
ed390780 added this warning but included an extra dash which caused it to be ignored. Remove the extra dash so the warning is applied.

Also remove some unused test code that violated the new warning.
2026-01-23 16:10:09 +07:00
David Steele c2b10a85b7 Use more specific warning for nonstring meson compiler probe.
Previously -Wextra was used, which is overly broad and led to the issue in 303e7458. Instead use a specific error to avoid side effects.

It is possible that this warning will not be recognized by all compilers but that is not an issue since this is only important for development. Warnings are ignored for production builds.
2026-01-23 10:17:56 +07:00
David Steele d4465bd6f7 Suppress unused parameter errors in meson compiler probes.
The main() parameters in meson compiler probes were not being used but could cause unused parameter errors.

Since the parameters are not needed remove them. This also has the benefit of making the code a bit simpler.
2026-01-23 10:08:48 +07:00
David Steele af8a9e1ea7 Update NEWS.md for new version and features. 2026-01-21 16:50:30 +07:00
David Steele 9fb9f73066 Documentation no longer builds on PostgreSQL < 10.
pgBackRest still supports PostgreSQL 9.6 but documentation is not built for EOL versions.

This will simplify the migration of the documentation to C.
2026-01-20 12:30:05 +07:00
David Steele 9ea54af67c Enhance StringId with optional sequence information.
It is convenient that a StringId can be used as an integer and also be rendered as a string. However, in many cases it is simpler and more efficient to have a sequence that can be used for lookup into an array or in a switch statement. This is particularly useful for StringIds generated by the config module.

Sequences cannot be used everywhere, though. In some cases StringIds are generated from text stored in files (e.g. compress type) in which case it is not possible to add sequence info without additional complexity.
2026-01-20 12:17:52 +07:00
David Steele 2a4fcf4b58 Update LICENSE.txt and PostgreSQL copyright for 2026. 2026-01-19 17:36:38 +07:00
David Steele d9f778ee32 Begin v2.59.0 development. 2026-01-19 17:17:07 +07:00
David Steele d50cfa9ee0 v2.58.0: Object Storage Improvements
IMPORTANT NOTE: The minimum values for the repo-storage-upload-chunk-size option have increased. They now represent the minimum allowed by the vendors.

Bug Fixes:

* Fix deadlock due to logging in signal handler. (Fixed by Maxim Michkov. Reviewed by David Steele.)

Features:

* HTTP support for S3, GCS, and Azure. (Contributed by Will Morland. Reviewed by David Steele.)
* Allow expiration of oldest full backup regardless of current retention. (Contributed by Stefan Fercot. Reviewed by David Steele. Suggested by Ron Johnson.)
* Support for Azure managed identities. (Contributed by Moiz Ibrar, Matthew Mols. Reviewed by David Steele.)
* Experimental support for S3 EKS pod identity. (Contributed by Pierre BOUTELOUP. Reviewed by David Steele.)
* Allow configuration of TLS cipher suites. (Contributed by Gunnar "Nick" Bluth. Reviewed by David Steele.)
* Allow process priority to be set. (Reviewed by Douglas J Hunley.)

Improvements:

* Allow dots in S3 bucket names when using path-style URIs. (Contributed by Joakim Hindersson. Reviewed by David Steele.)
* Require TLS >= 1.2 unless verification is disabled. (Reviewed by Douglas J Hunley, Gunnar "Nick" Bluth.)
* Dynamically size S3/GCS/Azure chunks for large uploads. (Reviewed by Douglas J Hunley. Suggested by Timothée Peignier.)
* Optimize S3/GCS/Azure chunk size for small files. (Reviewed by Douglas J Hunley.)
* Remove support for PostgreSQL 9.5. (Reviewed by Douglas J Hunley.)
* Improve logging of default for options with an unresolved dependency. (Reviewed by Stefan Fercot.)

Documentation Improvements:

* Remove explicit max_wal_senders/wal_level configuration from user guide. (Suggested by Jamie Nguyen.)
* Clarify that bundling is useful for filesystems with large block sizes. (Suggested by Ron Johnson.)
release/2.58.0
2026-01-19 17:03:44 +07:00
David Steele d206d89d5f New CI container builds. 2026-01-19 16:29:57 +07:00
David Steele b52ebe1fd8 Suppress Azurite API version checking in documentation builds.
The az tool used to create the bucket now requires an API version greater than what Azurite supports. This may be a mistake on their part (but has not resolved after a day) or may indicate that Azurite is no longer actively supported.

Either way, for now it is easiest to suppress the version check so CI builds can proceed. Other corrective action can be taken later as needed.
2026-01-15 12:01:51 +07:00
David Steele 6904cdf5a8 Simplify log-level options in config.yaml.
These were overly verbose -- inheritance is the way to do this.
2026-01-11 21:00:39 +07:00