Issue 487 db

This is ready for initial review. Thanks. 
That's the issue, it limits flexibility in the event of FS issues if the max ID is the active filesystem. Better to be explicit rather than implicit here.