View Issue Details

IDProjectCategoryView StatusLast Update
0001505bareos-coreGeneralpublic2023-01-12 16:39
Reporterdedysobr Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
PlatformLinuxOSCentOSOS Version7
Product Version22.0.0 
Summary0001505: bugs in postgres
DescriptionI Deleted the bareos database and created a new one via bareos scripts. When backup tasks are started, I see errors in the postgres logs

ERROR: syntax error at or near ")" at character 48
STATEMENT: DELETE FROM NDMPJobEnvironment WHERE JobId IN ()
ERROR: syntax error at or near ")" at character 48
STATEMENT: DELETE FROM NDMPJobEnvironment WHERE JobId IN ()
ERROR: syntax error at or near ")" at character 38
STATEMENT: DELETE FROM JobStats WHERE JobId IN ()
ERROR: syntax error at or near ")" at character 38
STATEMENT: DELETE FROM JobStats WHERE JobId IN ()
ERROR: syntax error at or near ")" at character 109
STATEMENT: CREATE TEMPORARY TABLE cpy_tmp AS SELECT MIN(JobId) AS JobId FROM Job WHERE Type = 'C' AND ( PriorJobId IN () OR PriorJobId IN ( SELECT PriorJobId FROM Job WHERE JobId IN () AND Type = 'B' ) ) GROUP BY PriorJobId
ERROR: syntax error at or near ")" at character 109
STATEMENT: CREATE TEMPORARY TABLE cpy_tmp AS SELECT MIN(JobId) AS JobId FROM Job WHERE Type = 'C' AND ( PriorJobId IN () OR PriorJobId IN ( SELECT PriorJobId FROM Job WHERE JobId IN () AND Type = 'B' ) ) GROUP BY PriorJobId
ERROR: relation "cpy_tmp" does not exist at character 60
STATEMENT: UPDATE Job SET Type='B' WHERE JobId IN ( SELECT JobId FROM cpy_tmp )
ERROR: relation "cpy_tmp" does not exist at character 60
STATEMENT: UPDATE Job SET Type='B' WHERE JobId IN ( SELECT JobId FROM cpy_tmp )
ERROR: relation "cpy_tmp" does not exist at character 70
STATEMENT: DELETE FROM Job WHERE Type='c' AND priorjobid IN ( SELECT JobId FROM cpy_tmp )
ERROR: relation "cpy_tmp" does not exist at character 70
STATEMENT: DELETE FROM Job WHERE Type='c' AND priorjobid IN ( SELECT JobId FROM cpy_tmp )
ERROR: table "cpy_tmp" does not exist
STATEMENT: DROP TABLE cpy_tmp
ERROR: table "cpy_tmp" does not exist
STATEMENT: DROP TABLE cpy_tmp
ERROR: syntax error at or near ")" at character 33
STATEMENT: DELETE FROM Job WHERE JobId IN ()
ERROR: syntax error at or near ")" at character 33
STATEMENT: DELETE FROM Job WHERE JobId IN ()
NOTICE: table "delcandidates" does not exist, skipping
DEBUG: autovacuum: processing database "bareos"
TagsNo tags attached.
bareos-master: impact
bareos-master: action
bareos-19.2: impact
bareos-19.2: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action

Activities

bruno-at-bareos

bruno-at-bareos

2023-01-03 11:07

developer   ~0004848

How did you create it ?

Did you follow carefully the steps in documentation ?
https://docs.bareos.org/master/IntroductionAndTutorial/InstallingBareos.html#other-platforms

What is your postgresql version used.
dedysobr

dedysobr

2023-01-04 07:12

reporter   ~0004851

postgresql 11
Did you follow carefully the steps in documentation ? - yes
bruno-at-bareos

bruno-at-bareos

2023-01-04 09:33

developer   ~0004852

copy_tmp is used when the oldest copy of a backup need to be promoted to Backup again to serve as base.
What kind of jobs you have, and configuration?
bruno-at-bareos

bruno-at-bareos

2023-01-12 16:39

developer   ~0004859

Hi we were not able to reproduce those error log in postgresql, neither with running system, nor with freshly installed.

Could you share your postgresql setup and bareos setup ?

We analyze the code and if some additionals checks will be added to limit access to this kind of errors, it is highly improbable to trigger this, so if you can describe what and how you run into this that can help.

Issue History

Date Modified Username Field Change
2023-01-03 08:33 dedysobr New Issue
2023-01-03 11:07 bruno-at-bareos Note Added: 0004848
2023-01-04 07:12 dedysobr Note Added: 0004851
2023-01-04 09:33 bruno-at-bareos Note Added: 0004852
2023-01-12 16:39 bruno-at-bareos Note Added: 0004859