View Issue Details

IDProjectCategoryView StatusLast Update
0001485bareos-coreGeneralpublic2022-10-05 10:24
Reporterlinuxyz Assigned Tobruno-at-bareos  
PriorityurgentSeverityminorReproducibilitysometimes
Status closedResolutionnot fixable 
PlatformLinuxOSCentOSOS Version7
Summary0001485: Database update error during a backup
DescriptionHello,

during a Virtual Full Backup today appears the following error (database PostgreSql) :

Error: sql_update.c:387 sql_update.c:387 update UPDATE Media SET VolJobs=1,VolFiles=0,VolBlocks=15500,VolBytes=999936179,VolMounts=145,VolErrors=0,VolWrites=2147492811,MaxVolBytes=0,VolStatus='Used',Slot=0,InChanger=0,VolReadTime=0,VolWriteTime=105892593961,LabelType=0,StorageId=34,PoolId=77,VolRetention=86400,VolUseDuration=0,MaxVolJobs=1,MaxVolFiles=0,Enabled=1,LocationId=0,ScratchPoolId=0,RecyclePoolId=0,RecycleCount=145,Recycle=1,ActionOnPurge=0,MinBlocksize=0,MaxBlocksize=0 WHERE VolumeName='Svr018_PUB_Copy' failed:
ERROR: integer out of range

It seems that a database field is too small.

Best Regards.




TagsNo tags attached.

Activities

bruno-at-bareos

bruno-at-bareos

2022-10-04 10:19

manager   ~0004796

As you forget to indicate which version of Bareos and PostgreSQL you are using,
We would like to have those informations, and also can you drop here the definition of your Media table.

In your query it seems only the following field is over integer value VolWriteTime=105892593961
but this can't impact Bareos as since the beginning in 2013, the table media is created with
bigint

Here the actual definition for Bareos 21
https://github.com/bareos/bareos/blob/e79ba793eccd893399870eae4fd397fb9d3a37ec/core/src/cats/ddl/creates/postgresql.sql#L153
linuxyz

linuxyz

2022-10-04 17:26

reporter   ~0004805

Hello Bruno, thanks for your reply!

Version of Bareos: 16.2
Version of PostgreSql: 9.2.24

The definition of the Media table: as attachment.

Best regards.
Media_table.txt (6,772 bytes)   
bareos-# \d+ Media
                                                               Table "public.media"
      Column      |            Type             |                        Modifiers                        | Storage  | Stats target | Description 
------------------+-----------------------------+---------------------------------------------------------+----------+--------------+-------------
 mediaid          | integer                     | not null default nextval('media_mediaid_seq'::regclass) | plain    |              | 
 volumename       | text                        | not null                                                | extended |              | 
 slot             | integer                     | default 0                                               | plain    |              | 
 poolid           | integer                     | default 0                                               | plain    |              | 
 mediatype        | text                        | not null                                                | extended |              | 
 mediatypeid      | integer                     | default 0                                               | plain    |              | 
 labeltype        | integer                     | default 0                                               | plain    |              | 
 firstwritten     | timestamp without time zone |                                                         | plain    |              | 
 lastwritten      | timestamp without time zone |                                                         | plain    |              | 
 labeldate        | timestamp without time zone |                                                         | plain    |              | 
 voljobs          | integer                     | default 0                                               | plain    |              | 
 volfiles         | integer                     | default 0                                               | plain    |              | 
 volblocks        | integer                     | default 0                                               | plain    |              | 
 volmounts        | integer                     | default 0                                               | plain    |              | 
 volbytes         | bigint                      | default 0                                               | plain    |              | 
 volerrors        | integer                     | default 0                                               | plain    |              | 
 volwrites        | integer                     | default 0                                               | plain    |              | 
 volcapacitybytes | bigint                      | default 0                                               | plain    |              | 
 volstatus        | text                        | not null                                                | extended |              | 
 enabled          | smallint                    | default 1                                               | plain    |              | 
 recycle          | smallint                    | default 0                                               | plain    |              | 
 actiononpurge    | smallint                    | default 0                                               | plain    |              | 
 volretention     | bigint                      | default 0                                               | plain    |              | 
 voluseduration   | bigint                      | default 0                                               | plain    |              | 
 maxvoljobs       | integer                     | default 0                                               | plain    |              | 
 maxvolfiles      | integer                     | default 0                                               | plain    |              | 
 maxvolbytes      | bigint                      | default 0                                               | plain    |              | 
 inchanger        | smallint                    | default 0                                               | plain    |              | 
 storageid        | integer                     | default 0                                               | plain    |              | 
 deviceid         | integer                     | default 0                                               | plain    |              | 
 mediaaddressing  | smallint                    | default 0                                               | plain    |              | 
 volreadtime      | bigint                      | default 0                                               | plain    |              | 
 volwritetime     | bigint                      | default 0                                               | plain    |              | 
 endfile          | integer                     | default 0                                               | plain    |              | 
 endblock         | bigint                      | default 0                                               | plain    |              | 
 locationid       | integer                     | default 0                                               | plain    |              | 
 recyclecount     | integer                     | default 0                                               | plain    |              | 
 minblocksize     | integer                     | default 0                                               | plain    |              | 
 maxblocksize     | integer                     | default 0                                               | plain    |              | 
 initialwrite     | timestamp without time zone |                                                         | plain    |              | 
 scratchpoolid    | integer                     | default 0                                               | plain    |              | 
 recyclepoolid    | integer                     | default 0                                               | plain    |              | 
 encryptionkey    | text                        |                                                         | extended |              | 
 comment          | text                        |                                                         | extended |              | 
Indexes:
    "media_pkey" PRIMARY KEY, btree (mediaid)
    "media_volumename_id" UNIQUE, btree (volumename)
    "media_poolid_idx" btree (poolid)
Check constraints:
    "media_volstatus_check" CHECK (volstatus = ANY (ARRAY['Full'::text, 'Archive'::text, 'Append'::text, 'Recycle'::text, 'Purged'::text, 'Read-Only'::text, 'Disabled'::text, 'Error'::text, 'Busy'::text, 'Used':
:text, 'Cleaning'::text, 'Scratch'::text]))
Has OIDs: no

Media_table.txt (6,772 bytes)   
bruno-at-bareos

bruno-at-bareos

2022-10-05 10:24

manager   ~0004808

16.2 is since long time no more supported, please update to 21 and retry.
bruno-at-bareos

bruno-at-bareos

2022-10-05 10:24

manager   ~0004809

out of support version.

Issue History

Date Modified Username Field Change
2022-10-03 15:12 linuxyz New Issue
2022-10-04 10:19 bruno-at-bareos Note Added: 0004796
2022-10-04 17:26 linuxyz Note Added: 0004805
2022-10-04 17:26 linuxyz File Added: Media_table.txt
2022-10-05 10:24 bruno-at-bareos Note Added: 0004808
2022-10-05 10:24 bruno-at-bareos Assigned To => bruno-at-bareos
2022-10-05 10:24 bruno-at-bareos Status new => closed
2022-10-05 10:24 bruno-at-bareos Resolution open => not fixable
2022-10-05 10:24 bruno-at-bareos Note Added: 0004809