View Issue Details

IDProjectCategoryView StatusLast Update
0001488bareos-corefile daemonpublic2023-09-11 15:40
Reportertuxmaster Assigned Tobruno-at-bareos  
PriorityurgentSeverityblockReproducibilityalways
Status assignedResolutionopen 
Platformx86_64OSRHELOS Version9
Product Version21.1.4 
Summary0001488: PostgreSQL Plugin fails on PostgreSQL 15
DescriptionBecause the backup functions was renamed, the add can't backup anything.
See:
https://www.postgresql.org/docs/15/functions-admin.html
https://www.postgresql.org/docs/current/release-15.html

Functions pg_start_backup()/pg_stop_backup() have been renamed to pg_backup_start()/pg_backup_stop(),
and the functions pg_backup_start_time() and pg_is_in_backup() have been removed.
TagsNo tags attached.

Activities

tuxmaster

tuxmaster

2022-10-22 21:12

reporter   ~0004818

Also the file backup_label is not created any more.
It looks like the backup process has changed.
https://www.postgresql.org/docs/current/continuous-archiving.html#BACKUP-BASE-BACKUP
See 26.3.3
pg_backup_stop will return two fields, that has to be saved into files by the backup tool. (2-> backup_label, 3. -> tablespace_map).
bruno-at-bareos

bruno-at-bareos

2022-11-03 10:19

manager   ~0004822

Seen by developer, but PR from external is welcomed too ;-)
hostedpower

hostedpower

2023-05-11 16:50

reporter   ~0005042

We have the same problem, we upgraded recently to postgresql 15.2 and no we cannot backup anything more, what can we do now?
bruno-at-bareos

bruno-at-bareos

2023-05-11 16:54

manager   ~0005043

Using postgresql15 as database for bareos is possible but need new grant script which is proposed here
future new grant script in https://github.com/bareos/bareos/pull/1449/files
full file is https://github.com/bareos/bareos/blob/3660d4c4b59fd17052d663bd22927fa85b2398e6/core/src/cats/ddl/grants/postgresql.sql

Backup & Restore PostgreSQL15 database with the postgresql plugin is not possible due to full changes of the backup API by PGDG group starting with 15.
Contribution for improving the code is still awaited ...
hostedpower

hostedpower

2023-05-11 18:31

reporter   ~0005044

I checked, but we still use postgresql 14 for Bareos fortunately :)

However our servers with postgresql 15 fail to backup. I checked and probably the easiest way is to switch to non exclusive backups for postgresql 15 as well. Most likely it could than function in the same way.

The commands are renamed (easy) and the biggest difference for the rest is that the backup_label is no longer written to the file system but written when the "backup stop" is called.
hostedpower

hostedpower

2023-05-12 05:26

reporter   ~0005045

https://www.enterprisedb.com/blog/exclusive-backup-mode-finally-removed-postgres-15
https://www.cybertec-postgresql.com/en/exclusive-backup-deprecated-what-now/

The exclusive backup mode was deprecated since PostgreSQL 9.6 when non-exclusive backups were introduced.

No idea why a brand new plugin was created with a method deprecated for more than 5 years!
hostedpower

hostedpower

2023-05-15 21:40

reporter   ~0005060

Hi, let us know if there is anything we can do to get the required changes. I think it must be pretty doable for the creator of the original plugin. As ar as I know the older PostgreSQL support even the same backup procedures (and even the same name: pg_backup_start etc)

Maybe we can fund it a bit with the original requester of the functionality?
bruno-at-bareos

bruno-at-bareos

2023-09-04 10:58

manager   ~0005362

To keep you informed: A new plugin will appear in 23 supporting PostgreSQL >= 10
The PR is available here https://github.com/bareos/bareos/pull/1541

Once build you can test with package located in https://download.bareos.org/experimental/PR-1541/
The new documentation will also appear into that repository.

We will appreciate comments, remarks, and tests.
bruno-at-bareos

bruno-at-bareos

2023-09-11 15:39

manager   ~0005402

Sorry took more time than expected, but finally the testing packages are now published.
https://download.bareos.org/experimental/PR-1541/

Associated documentation is also available at that address https://download.bareos.org/experimental/PR-1541/BareosMainReference/TasksAndConcepts/Plugins.html#postgresql-plugin

Issue History

Date Modified Username Field Change
2022-10-22 19:29 tuxmaster New Issue
2022-10-22 21:12 tuxmaster Note Added: 0004818
2022-11-03 10:19 bruno-at-bareos Assigned To => bruno-at-bareos
2022-11-03 10:19 bruno-at-bareos Status new => acknowledged
2022-11-03 10:19 bruno-at-bareos Note Added: 0004822
2023-02-13 10:41 bruno-at-bareos Assigned To bruno-at-bareos =>
2023-05-11 16:50 hostedpower Note Added: 0005042
2023-05-11 16:54 bruno-at-bareos Note Added: 0005043
2023-05-11 18:31 hostedpower Note Added: 0005044
2023-05-12 05:26 hostedpower Note Added: 0005045
2023-05-15 21:40 hostedpower Note Added: 0005060
2023-08-28 16:01 bruno-at-bareos Assigned To => bruno-at-bareos
2023-08-28 16:01 bruno-at-bareos Status acknowledged => assigned
2023-09-04 10:58 bruno-at-bareos Note Added: 0005362
2023-09-04 10:59 bruno-at-bareos Status assigned => confirmed
2023-09-11 15:39 bruno-at-bareos Note Added: 0005402
2023-09-11 15:40 bruno-at-bareos Status confirmed => assigned