This is not a serious bug really, but I noticed that `db_con_t.tail` is a long, but in every case I've seen it contains a pointer cast to long instead. Just to ensure portability, it could be a pointer.
It could also explain the field a bit better. Current comment says "Variable length tail, database module specific", which (because of the name) I'd normally expect to be expanding, trailing array (char tail). "Pointer to implementation-specific database state" could be more useful there.