View Issue Details

IDProjectCategoryView StatusLast Update
0001505bareos-coreGeneralpublic2023-07-18 17:14
Reporterdedysobr Assigned Tobruno-at-bareos  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionwon't fix 
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.

Activities

bruno-at-bareos

bruno-at-bareos

2023-01-03 11:07

manager   ~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

manager   ~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

manager   ~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.
bruno-at-bareos

bruno-at-bareos

2023-02-07 14:02

manager   ~0004881

Without exact process to reproduce we weren't able to have the similar reported output.
bruno-at-bareos

bruno-at-bareos

2023-07-18 17:14

manager   ~0005219

Fixes are provided in master with PR1512, backports will be done in PR1513 for next 22.1.1

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
2023-02-07 14:02 bruno-at-bareos Assigned To => bruno-at-bareos
2023-02-07 14:02 bruno-at-bareos Status new => closed
2023-02-07 14:02 bruno-at-bareos Resolution open => won't fix
2023-02-07 14:02 bruno-at-bareos Note Added: 0004881
2023-07-18 17:14 bruno-at-bareos Note Added: 0005219