[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] small dbcheck patch for mysql


* Dan Langille schrieb am 09.09.08 um 22:15 Uhr:
> Marc Schiffbauer wrote:
> > * Bill Moran schrieb am 09.09.08 um 19:41 Uhr:
> >> The canonical way to solve this would be to keep a reference counter in
> >> the filename/path tables that keeps track of how many file entries
> >> reference that row.  When it's hits 0, it can be deleted.  But this
> >> creates other issues:
> >> 1) What is the overhead of maintaining the reference counter?
> >> 2) In the case of a crash, we _must_ fix all reference counters immediately,
> >>    otherwise records could be deleted that still need to be used.
> >>
> >> Referential integrity doesn't even gain us much here, as that only
> >> guarantees that records can't be created that don't have proper
> >> references, it doesn't automatically clean up after deletes.
> > 
> > AFAIK it does work if the database is properly created, not?
> > (with foreign keys)
> 
> What are you talking about?  :)  Please elaborate.

I was talking about constraints that let the database delete records
that would otherwise be "orphaned" records.

-> "ON DELETE CASCADE"

Would this be to much of a performance impact?

Or did I not get the point? :)

-Marc
-- 
8AAC 5F46 83B4 DB70 8317  3723 296C 6CCA 35A6 4134

-------------------------------------------------------------------------
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-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilot Consulting.