Bacula-users

[Bacula-users] 64bit for File.FileId

2008-11-07 08:04:56
Subject: [Bacula-users] 64bit for File.FileId
From: Dan Langille <dan AT langille DOT org>
To: bacula-users <bacula-users AT lists.sourceforge DOT net>
Date: Fri, 7 Nov 2008 08:02:13 -0500
I know I've seen something about moving to BIGSERIAL but don't know
where.  Does someone have a patch.

Please CC the original poster who would like to fix this before the
weekend backups.

Begin forwarded message:

> From: James Cort <james.cort AT u4eatech DOT com>
> Date: November 7, 2008 4:50:59 AM EST
> To: bacula-users <bacula-users AT lists.sourceforge DOT net>
> Subject: [Bacula-users] Ran out of fileid's in postgres-backed  
> database
>
> I appear to have run out of fileids in my bacula database.
>
> I'm using bacula 2.2.8-8~bpo40+1  (the Debian Etch backported package)
> and my backups have failed with the error:
>
> Fatal error: Can't fill File table Query failed: INSERT INTO File
> (FileIndex, JobId, PathId, FilenameId, LStat, MD5)SELECT
> batch.FileIndex, batch.JobId, Path.PathId,
> Filename.FilenameId,batch.LStat, batch.MD5 FROM batch JOIN Path ON
> (batch.Path = Path.Path) JOIN Filename ON (batch.Name =  
> Filename.Name):
> ERR=ERROR:  integer out of range
>
>
> I'm using Postgres as the backend and I note from the script which
> bacula uses to setup the table "file" that fileid is of type serial.
>
> bacula=> select max(fileid) from file;
>    max
> ------------
> 2147272756
> (1 row)
>
> 2^31=2147483648
>
>
> Postgresql's documentation states:
>
> "The type names serial and serial4 are equivalent: both create integer
> columns. The type names bigserial and serial8 work just the same way,
> except that they create a bigint column. bigserial should be used if  
> you
> anticipate the use of more than 2^31 identifiers over the lifetime of
> the table."
>
> ... but I'm not too keen on doing this unless I can be sure it won't
> have a knock-on effect on Bacula.
>
> What can I do to fix this?
>
>
> James
>
> -- 
> U4EA Technologies
> http://www.u4eatech.com
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's  
> challenge
> Build the coolest Linux based applications with Moblin SDK & win  
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in  
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users

-- 
Dan Langille
http://langille.org/





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users