-
Type:
Bug
-
Resolution: Fixed
-
Priority:
High
-
Affects Version/s: 8.6.0
-
Component/s: Maintenance - Backup / Restore
-
2
-
Severity 2 - Major
-
3
Issue Summary
Bitbucket 8.6 and higher is compatible with Postgres 15 but the DIY backup script does not work with Postgres 15. This is due to --no-synchronized-snapshots no longer being a valid flag for pg_dump.
--no-synchronized-snapshots was used to make pg_dump backwards compatible when doing parallel dumps with Postgres 9.1 and lower as these versions did not have synchronized snapshots. This was made redundant in Postgres 15 as the lowest version it supported became Postgres 9.2, so the flag was removed.
Expected Results
The DIY backup script executes without any error.
Actual Results
The below exception is thrown by the script file and the backup fails:
pg_dump: unrecognized option '--no-synchronized-snapshots' pg_dump: hint: Try "pg_dump --help" for more information.
Steps to Reproduce
- Install Bitbucket 8.6.0 or higher
- Migrate the database to use Postgres 15
- Execute the DIY backup script
Workaround
Modify database-postgresql.sh with the following:
if [[ ${psql_majorminor} -ge 9003 ]]; then PG_PARALLEL="-j 5" if [[ ${psql_major} -lt 15 ]]; then PG_SNAPSHOT_OPT="--no-synchronized-snapshots" fi fi