Adding ability to cleanup database stale resources

Prod-Related: PROD-35183
Change-Id: I3e35c706653ff3d2773d29582be8db41e2d2139a
diff --git a/README.rst b/README.rst
index b111d84..0db3104 100644
--- a/README.rst
+++ b/README.rst
@@ -1496,3 +1496,59 @@
     nova:
       upgrade:
         manage_service_maintenance: false
+
+Execute database maintenance tasks
+----------------------------------
+Cleanup stale records from nova database to make it smaller.
+This is helpful before any upgrade activity.
+It is safe to execute it generally without maintenance window same as online db_sync.
+
+Enable this pillar:
+
+.. code-block:: yaml
+
+   nova:
+     controller:
+       db_purge:
+         enabled: True
+
+Execute state nova.db.db_cleanup to purge stale records:
+
+.. code-block:: bash
+
+   salt -C 'I@nova:controller:role:primary' state.apply nova.db.db_cleanup -l debug
+
+Starting from rocky release it is possible to pass days parameter.
+If you skip setting it, all records would be archived/purged:
+
+.. code-block:: yaml
+
+   nova:
+     controller:
+       db_purge:
+         enabled: True
+         days: 45
+
+Control pre-rocky releases parameters:
+
+.. code-block:: yaml
+
+   nova:
+     controller:
+       db_purge:
+         enabled: True
+         max_rows: 1000
+         verbose: True
+
+Control rocky+ releases parameters:
+'days' and 'all' parameters are mutually exclusive.
+
+.. code-block:: yaml
+
+   nova:
+     controller:
+       db_purge:
+         enabled: True
+         all: True
+         verbose: True
+         all_cells: True