← Back to team overview

dhis2-devs team mailing list archive

2.29/2.30 WARNING - do not use Maintenance->ClearAnalyticsTables & parameter "-T analytics*" for database dumps

 

Hi

For as long as I can remember, we have used the standard parameter "-T
analytics*" when dumping a DHIS2 database into e.g. a backup or similar.

The purpose of the parameter was to exclude all analytics tables from the
dump, since it is significantly faster to restore a dump without analytics
tables and then run analytics to re-create them (due to the use of
multi-threading), compared to dumping and restoring a database instance
with all the analytics table (restore is NOT using multi-threading).

For some reason, in 2.29 a new table that stores periodboundary data for
Program Indicators was called "analyticsperiodboundary" - which means the
standard pg_dump parameter will leave that table behind together with all
other "analytics*" tables.

Furthermore, the routine called "Clear Analytics Tables" found under Data
Administration -> Maintenance is as before deleting all tables named
Analytics* - THE PROBLEM IS THAT IT ALSO DELETES THE NEW
ANALYTICSPERIODBOUNDARY TABLE (same in both 2.29 and 2.30)

Which will crash your system in the sense that you won't see any program
indicator data in dashboards etc.

The "analyticsperiodboundary" table will be re-created and re-populated
with DEFAULT (boundless) Program Indicator Period boundaries when you
re-start the system (it's part of the TableAlteror routine during startup),
but
- you have to re-start the system
- you will lose any non-default boundary settings used for any program
indicator.

This has also been reported as a high-priority bug on JIRA (DHIS2-4260).

Regards
Calle

*******************************************

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@xxxxxxxxx

Skype: calle_hedberg

*******************************************

Follow ups