Avoid lost data on some database query retries.