View Issue Details

IDProjectCategoryView StatusLast Update
0001562bareos-coredirectorpublic2024-02-06 09:39
ReporterXANI Assigned Tobruno-at-bareos  
Status closedResolutionfixed 
PlatformLinuxOSDebianOS Version12
Product Version22.1.1 
Summary0001562: Bareos displays misleading message when SQL query fails
DescriptionBackground: PostgreSQL 15 denied access to public schema by default, which that in turn caused bareos to trigger error:

    2023-10-26 13:14:12.267 CEST [3096826] bareos@bareos STATEMENT: CREATE TABLE btemp381816 AS SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 247 AND Level = 'F' AND JobStatus IN ('T', 'W') AND Type = 'B' AND StartTime < '2023-10-26 13:14:13' AND FileSet.FileSetId = 2 ORDER BY Job.JobId DESC, Job.JobTDate DESC LIMIT 1
2023-10-26 13:14:12.275 CEST [3124199] bareos@bareos ERROR: permission denied for schema public

And that failed accurate diff/incremental jobs. Which is fine, admin fix your permissions etc. but the message in director logs is just

     Fatal error: Cannot find previous jobids.

where it should be saying that the SQL failed

Steps To ReproduceUpgrade existing install to PostgreSQL 15
Tagsdatabase, errors




2023-10-26 16:07

manager   ~0005480

We are aware of that kind of problem already.
in next 23 the PG15 support is complete so no trouble about this.

but the forwarded message from the db is not yet implemented.


2023-10-26 17:21

manager   ~0005482

and also PG16 will be usable as backend.


2023-10-26 17:28

reporter   ~0005483

Yeah the permission problem itself is no big deal, just a very confusing error message. I found that out when I flipped one of the jobs to run as Accurate and it just started failing for no discernable reason.


2024-02-06 09:39

manager   ~0005735

fixed in 23

Issue History

Date Modified Username Field Change
2023-10-26 13:31 XANI New Issue
2023-10-26 16:07 bruno-at-bareos Note Added: 0005480
2023-10-26 16:09 bruno-at-bareos Tag Attached: database
2023-10-26 16:09 bruno-at-bareos Tag Attached: errors
2023-10-26 17:21 bruno-at-bareos Note Added: 0005482
2023-10-26 17:28 XANI Note Added: 0005483
2024-02-06 09:39 bruno-at-bareos Assigned To => bruno-at-bareos
2024-02-06 09:39 bruno-at-bareos Status new => closed
2024-02-06 09:39 bruno-at-bareos Resolution open => fixed
2024-02-06 09:39 bruno-at-bareos Note Added: 0005735