Kern Sibbald wrote: > Basing "consecutiveness" on MediaId will not work very well as the SQL gurus > can confirm since the MediaIds are not guaranteed to be consecutive. In > fact, if you ever delete any volumes, in most SQL engines (e.g. like MySQL), > the next volume created will take on the lowest free MediaId. > I'm pretty sure that the normal way of working for an SQL engine is to always use a higher number when creating new records. That's how the serial type in PostgreSQL works. I don't think an RDBMS tries to 'recycle' primary keys. This might have very nasty side effects when there would still be some foreign keys point to that primary key. Of course, I don't know if this MediaID is in fact a primary key.
Kind regards, Jo _______________________________________________ Bacula-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-users
