View Issue Details

IDProjectCategoryView StatusLast Update
0001488bareos-corefile daemonpublic2023-10-31 09:55
Reportertuxmaster Assigned Tobruno-at-bareos  
PriorityurgentSeverityblockReproducibilityalways
Status closedResolutionfixed 
Platformx86_64OSRHELOS Version9
Product Version21.1.4 
Fixed in Version23.0.0 
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
bruno-at-bareos

bruno-at-bareos

2023-10-11 09:50

manager   ~0005455

Dear community, it has been a long time since we were able to release a new set of binaries to test the new bareos-fd-postgresql plugin.
You can now get the updated binaries directly from the experimental project
https://download.bareos.org/experimental/PR-1541/

For those who have already installed and tested it, you should be able to simply update your test system with your operating system command
like dnf, apt, zypper, etc.

The plugin is now able to backup any PostgreSQL cluster from version 10 to 16, it will no longer complain if file/dir changes during the
during the backup (as these changes are recorded in wal and saved at the end).

We improved our system test to cover the case with cluster having activity or not, using tablespace, etc.

We add to rename some configuration parameters to make the whole more coherent, check the documentation or code if you need to adapt.

Reminder: the whole new documentation chapter about the plugin is available at
https://download.bareos.org/experimental/PR-1541/BareosMainReference/TasksAndConcepts/Plugins.html#postgresql-plugin

Thanks for any test you can do in your own environment, please report failure/success here on the mailing list,
and any code improvements in the github comments here

https://github.com/bareos/bareos/pull/1541/

Happy testing.
bruno-at-bareos

bruno-at-bareos

2023-10-26 10:47

manager   ~0005478

Any news about your tests ?
We would like to have the maximum of feedback, before going to merge the branch.
hostedpower

hostedpower

2023-10-26 10:49

reporter   ~0005479

Hi, can we "quickly" slip this plugin into the current bareos version? I believe we have also a new name for it right?
bruno-at-bareos

bruno-at-bareos

2023-10-26 16:22

manager   ~0005481

As described in previous command the plugin will goes into Bareos 23 (which should be release in October, so really soon)
It will not be backported to 22
it is called postgresql ( same package so if previous is installed the new one come with) but you have to configure it following the new documentation.

Testing and reporting success or failure now is allowing a chance to have the fix get done quickly, after it will always take a bit of time.
bruno-at-bareos

bruno-at-bareos

2023-10-31 09:55

manager   ~0005487

The new plugin code is now merged, and will be delivered with the soonish 23.0.0 build.

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
2023-10-11 09:50 bruno-at-bareos Note Added: 0005455
2023-10-26 10:47 bruno-at-bareos Status assigned => feedback
2023-10-26 10:47 bruno-at-bareos Note Added: 0005478
2023-10-26 10:49 hostedpower Note Added: 0005479
2023-10-26 16:22 bruno-at-bareos Note Added: 0005481
2023-10-31 09:55 bruno-at-bareos Status feedback => closed
2023-10-31 09:55 bruno-at-bareos Resolution open => fixed
2023-10-31 09:55 bruno-at-bareos Fixed in Version => 23.0.0
2023-10-31 09:55 bruno-at-bareos Note Added: 0005487