DLE: Add pre-checks to reduce the risk of errors
Goal
Consider implementing pre-checks. This is necessary to ensure at an early stage, for example, that there are no errors in the configuration before starting retrieval.
- For logical mode (pg_dump/pg_restore), get the size of the databases specified in the task and compare the size of the current pool (taking into account the number of datasets) and the total size of the databases. Output an error to the user in the UI and in the DLE log if the database size exceeds the current pool size.
- Run the database container (with 'initdb') using all the postgres parameters specified in the DLE configuration file. In order to minimize the risk of getting an error for example, at the stage of launching a data restore container after ten hours of receiving a dump or restoring from backup (physical mode).
- Something else? (TODO: think about a list of additional preliminary checks)
Example of problems that can cover items 1 and 2: https://database-lab-team.slack.com/archives/CTETNN484/p1691601125203449
TODO / How to implement
Acceptance criteria
- before starting the 'retrieval', all pre-checks are performed
Edited by Vitaliy Kukharik