db: move buf_size to the new add_definition_db_callback()