Return an error_code from materializeAllPermanently.