2019-02-20 15:48:14 +02:00
# Release Build Instructions
2024-10-21 08:57:43 +03:00
## Update CI container builds
If there have been PostgreSQL minor releases since the last pgBackRest release then update the CI containers to include the latest releases. This should be committed before the release.
2019-05-20 11:51:58 -04:00
## Create a branch to test the release
```
git checkout -b release-ci
```
## Update the date, version, and release title
Edit the latest release in `doc/xml/release.xml` , e.g.:
```
< release date = "XXXX-XX-XX" version = "2.14dev" title = "UNDER DEVELOPMENT" >
```
to:
```
2024-10-21 08:57:43 +03:00
< release date = "2019-05-20" version = "2.14.0" title = "Bug Fix and Improvements" >
2019-05-20 11:51:58 -04:00
```
2020-03-10 17:57:02 -04:00
Edit version in `src/version.h` , e.g.:
2019-05-20 11:51:58 -04:00
```
2020-03-10 17:57:02 -04:00
#define PROJECT_VERSION "2.14dev"
2019-05-20 11:51:58 -04:00
```
to:
```
2024-10-21 08:57:43 +03:00
#define PROJECT_VERSION "2.14.0"
2019-05-20 11:51:58 -04:00
```
2020-10-05 11:51:45 -04:00
## Update code counts
2019-05-20 11:51:58 -04:00
```
2022-07-18 09:32:30 -04:00
pgbackrest/test/test.pl --code-count
2019-05-20 11:51:58 -04:00
```
2020-10-05 11:51:45 -04:00
## Build release documentation. Be sure to install latex using the instructions from the Vagrantfile before running this step.
2019-05-20 11:51:58 -04:00
```
2022-07-18 09:32:30 -04:00
pgbackrest/doc/release.pl --build
2019-05-20 11:51:58 -04:00
```
## Commit release branch and push to CI for testing
```
git commit -m "Release test"
2019-09-03 16:39:32 -04:00
git push origin release-ci
2019-05-20 11:51:58 -04:00
```
2025-01-30 21:43:48 -05:00
## Run Coverity
- Prepare Coverity build directory (update version/paths as required):
```
2025-04-21 18:25:00 -04:00
mkdir coverity
tar -xvf ~/Downloads/cov-analysis-linux-arm64-2024.6.1.tar.gz --strip-components=1 -C ~/coverity
2025-01-30 21:43:48 -05:00
export COVERITY_TOKEN=?
export COVERITY_EMAIL=?
export COVERITY_VERSION=?
```
- Clean directories and run Coverity:
```
rm -rf .cache/ccache & & rm -rf build & & rm -rf pgbackrest.tgz & & rm -rf cov-int
meson setup -Dwerror=true -Dfatal-errors=true -Dbuildtype=debug build pgbackrest
2025-04-21 18:25:00 -04:00
coverity/bin/cov-build --dir cov-int ninja -C build
2025-01-30 21:43:48 -05:00
tar czvf pgbackrest.tgz cov-int
```
- Upload results:
```
curl --form token=${COVERITY_TOKEN?} --form email="${COVERITY_EMAIL?}" --form file=@pgbackrest .tgz \
--form version="${COVERITY_VERSION?}" --form description="dev build" \
"https://scan.coverity.com/builds?project=pgbackrest%2Fpgbackrest"
```
Check issues at https://scan.coverity.com/projects/pgbackrest-pgbackrest then fix and repeat Coverity runs as needed.
2021-08-12 07:49:59 -04:00
## Perform stress testing on release
- Build the documentation with stress testing enabled:
```
2022-07-18 09:32:30 -04:00
pgbackrest/doc/doc.pl --out=html --include=user-guide --require=/stress --var=stress=y --var=stress-scale-table=100 --var=stress-scale-data=1000 --pre --no-cache
2021-08-12 07:49:59 -04:00
```
During data load the archive-push and archive-get processes can be monitored with:
```
docker exec -it doc-pg-primary tail -f /var/log/pgbackrest/demo-archive-push-async.log
docker exec -it doc-pg-standby tail -f /var/log/pgbackrest/demo-archive-get-async.log
```
During backup/restore the processes can be monitored with:
```
docker exec -it doc-repository tail -f /var/log/pgbackrest/demo-backup.log
docker exec -it doc-pg-standby tail -f /var/log/pgbackrest/demo-restore.log
```
2021-08-23 06:52:51 -04:00
Processes can generally be monitored using 'top'. Once `top` is running, press `o` then enter `COMMAND=pgbackrest` . This will filter output to pgbackrest processes.
2021-08-12 07:49:59 -04:00
2021-10-21 13:31:22 -04:00
- Check for many log entries in the `archive-push` /`archive-get` logs to ensure async archiving was enabled:
2021-08-12 07:49:59 -04:00
```
docker exec -it doc-pg-primary vi /var/log/pgbackrest/demo-archive-push-async.log
docker exec -it doc-pg-standby vi /var/log/pgbackrest/demo-archive-get-async.log
```
- Check the backup log to ensure the correct tables/data were created and backed up. It should look something like:
```
INFO: full backup size = 14.9GB, file total = 101004
```
- Check the restore log to ensure the correct tables/data were restored. The size and file total should match exactly.
2019-05-20 11:51:58 -04:00
## Clone web documentation into `doc/site`
```
2022-07-18 09:32:30 -04:00
cd pgbackrest/doc
2019-05-24 07:41:55 -04:00
git clone git@github .com:pgbackrest/website.git site
2019-05-20 11:51:58 -04:00
```
## Deploy web documentation to `doc/site`
```
2022-07-18 09:32:30 -04:00
pgbackrest/doc/release.pl --deploy
2019-05-20 11:51:58 -04:00
```
## Final commit of release to integration
Create release notes based on the pattern in prior git commits (this should be automated at some point), e.g.
```
2024-10-21 08:57:43 +03:00
v2.14.0: Bug Fix and Improvements
2019-05-20 11:51:58 -04:00
Bug Fixes:
2021-10-21 13:31:22 -04:00
* Fix segfault when process-max > 8 for archive-push/archive-get. (Reported by User.)
2019-05-20 11:51:58 -04:00
Improvements:
2021-10-21 13:31:22 -04:00
* Bypass database checks when stanza-delete issued with force. (Contributed by User. Suggested by User.)
2019-05-20 11:51:58 -04:00
* Add configure script for improved multi-platform support.
Documentation Features:
2021-10-28 15:15:49 -04:00
* Add user guide for Debian.
2019-05-20 11:51:58 -04:00
```
Commit to integration with the above message and push to CI.
2021-10-13 12:01:53 -04:00
## Push to main
2019-05-20 11:51:58 -04:00
2021-10-13 12:01:53 -04:00
Push release commit to main once CI testing is complete.
2019-05-20 11:51:58 -04:00
## Create release on github
Create release notes based on pattern in prior releases (this should be automated at some point), e.g.
```
2024-10-21 08:57:43 +03:00
v2.14.0: Bug Fix and Improvements
2019-05-20 11:51:58 -04:00
**Bug Fixes**:
2021-10-21 13:31:22 -04:00
- Fix segfault when process-max > 8 for archive-push/archive-get. (Reported by User.)
2019-05-20 11:51:58 -04:00
**Improvements**:
2021-10-21 13:31:22 -04:00
- Bypass database checks when stanza-delete issued with force. (Contributed by User. Suggested by User.)
2019-05-20 11:51:58 -04:00
- Add configure script for improved multi-platform support.
**Documentation Features**:
2021-10-28 15:15:49 -04:00
- Add user guide for Debian.
2019-05-20 11:51:58 -04:00
```
2021-10-13 12:01:53 -04:00
The first line will be the release title and the rest will be the body. The tag field should be updated with the current version so a tag is created from main. **Be sure to select the release commit explicitly rather than auto-tagging the last commit in main!**
2019-05-20 11:51:58 -04:00
2021-10-13 12:01:53 -04:00
## Push web documentation to main and deploy
2019-05-20 11:51:58 -04:00
```
2022-07-18 09:32:30 -04:00
cd pgbackrest/doc/site
2024-10-21 08:57:43 +03:00
git commit -m "v2.14.0 documentation."
2021-10-13 12:01:53 -04:00
git push origin main
2019-05-20 11:51:58 -04:00
```
Deploy the documentation on `pgbackrest.org` .
## Notify packagers of new release
2025-04-23 13:17:19 -04:00
Notify the Debian packagers by email and RHEL packagers at https://github.com/pgdg-packaging/pgdg-rpms/issues.
2019-05-20 11:51:58 -04:00
## Announce release on Twitter
2019-05-20 12:23:40 -04:00
2021-05-03 09:34:22 -04:00
## Publish a postgresql.org news item when there are major new features
2020-07-28 11:20:07 -04:00
2021-05-03 09:34:22 -04:00
Start from NEWS.md and update with the new date, version, and interesting features added since the last release. News items are automatically sent to the `pgsql-announce` mailing list once they have been approved.
2020-07-28 11:20:07 -04:00
2024-01-25 10:41:20 -03:00
## Update PostgreSQL ecosystem wiki
Update version, date, and minimum supported version (when changed): https://wiki.postgresql.org/wiki/Ecosystem:Backup#pgBackRest
2019-05-20 12:23:40 -04:00
## Prepare for the next release
Add new release in `doc/xml/release.xml` , e.g.:
```
< release date = "XXXX-XX-XX" version = "2.15dev" title = "UNDER DEVELOPMENT" >
```
2020-03-10 17:57:02 -04:00
Edit version in `src/version.h` , e.g.:
2019-05-20 12:23:40 -04:00
```
2024-10-21 08:57:43 +03:00
#define PROJECT_VERSION "2.14.0"
2019-05-20 12:23:40 -04:00
```
to:
```
2020-03-10 17:57:02 -04:00
#define PROJECT_VERSION "2.15dev"
2019-06-25 08:42:20 -04:00
```
Run deploy to generate git history (ctrl-c as soon as the file is generated):
```
2022-07-18 09:32:30 -04:00
pgbackrest/doc/release.pl --build
2019-06-25 08:42:20 -04:00
```
2019-05-20 12:23:40 -04:00
2024-03-25 11:22:53 +13:00
Run code count to add new release file:
```
pgbackrest/test/test.pl --code-count
```
2019-05-20 12:23:40 -04:00
Commit and push to integration:
```
2024-10-21 09:11:49 +03:00
git commit -m "Begin v2.15.0 development."
2019-12-12 09:05:10 -05:00
git push origin integration
2019-05-20 12:23:40 -04:00
```