Kern Sibbald <[EMAIL PROTECTED]> wrote:
> On Sunday 23 July 2006 16:22, Bill Moran wrote:
[snip]
> > Anyway ... digging a bit deeper, the problem was that there were two
> > records in the pool table with a name of CFOnDisk.  Each had a unique
> > poolid, however.
> >
> > I did a "select distinct poolid from media" and found that only one of
> > the poolids was being used, and deleted the other record from the pool
> > table.  Everything is working fine now.
> >
> > Shouldn't there be a unique constraint on the name column of the pool
> > table?
> 
> Possibly, but normally Bacula ensures that it is unique by locking the 
> database.  Having unique constraints is one of the portability nightmares of 
> SQL from what I remember.  There was no universal way to determine what is 
> going on and required digging into the details of returned error codes.  That 
> is something that I would like to avoid.

Really?  That's a shame, I would've thought that something as universal
as a unique constraint would be pretty cross-RDMS.  I'll take your
word for it, as I've been pretty much dedicated to PostgreSQL for a few
years now.

> A more important question is why it was segment faulting because of this 
> condition.  It should have simply reported an error and continued.

Unfortunately, it only coredumped once that I'm aware of.  That was
Friday night, after which it was unable to make backups.  Nothing crashed
again, it would just give me errors about the pool.  These two in particular

2 22-Jul 10:42 mindwipe-dir: *Console*.2006-07-22_10.41.57 Error: sql_get.c:560 
More than one Pool!: 2 22-Jul 10:42 mindwipe-dir:
*Console*.2006-07-22_10.41.57 Fatal error: Pool CFOnDisk not in database. 
sql_create.c:171 pool record CFOnDisk already exists

It's kind of odd how the first one claims there's more than one pool, but
the second claims the pool doesn't exist ;)

Anyway, I'm in the dark as to how to reproduce this, or how to provide any
better debugging information.  I was _supposed_ to set this system up to
ensure we got backtraces if anything crashed, but it got missed.  I'll
add it back to my todo list tomorrow -- hopefully I'll have more useful
information if it happens again.

-- 
Bill Moran

We meddle.  People don't like to be meddled with.  We tell them what to do,
what to think.  Don't run, don't walk.  We're in their homes and in their
heads and we haven't the right.

        River Tam


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to