← Back to team overview

dhis2-devs team mailing list archive

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

 

It would have been good if all the "dispensable" tables could rather have
started with an underscore (though that again will of course break extant
scripts).

Knut

On Thu, Jul 12, 2018, 1:27 PM Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:

> Thats nasty alright.  I guess using "-T anlytics_*" instead would
> help.  But there are so many backup scripts out there broken by this
> that it will be better to rename the table.
>
> On 11 July 2018 at 22:39, Calle Hedberg <calle.hedberg@xxxxxxxxx> wrote:
> > 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
> >
> > *******************************************
> >
> >
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~dhis2-devs
> > Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~dhis2-devs
> > More help   : https://help.launchpad.net/ListHelp
> >
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>

References