Dear UserGroup,

A  DHIS2 database base was upgraded from an earlier 2.27 build to 2.27
build e33b34d . After the upgrade this error was reported when trying to
generate resource tables:

Process failed: PreparedStatementCallback; SQL [insert into
_dateperiodstructure_temp values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)]; ERROR:
duplicate key value violates unique constraint
"_dateperiodstructure_temp_pkey1"
Detail: Key (dateperiod)=(1994-03-20) already exists.; nested exception is
org.postgresql.util.PSQLException: ERROR: duplicate key value violates
unique constraint "_dateperiodstructure_temp_pkey1" Detail: Key
(dateperiod)=(1994-03-20) already exists.


I have checked the following:


   1. Period table....no duplication
   2. _periodstructure table...no duplication
   3. _dateperiodstructure table....no duplication.

I did find that the _periodstructure table has a few incorrect entries
(everything else in this table looks fine). Where would this come from?

periodid iso daysno startdate enddate
182669 201803 31 2018/03/01 2018/03/31
182670 201804 29 2018/04/01 2018/04/30
182672 201805 30 2018/06/01 2018/06/30
182673 201806 31 2018/07/01 2018/07/31
182674 201807 31 2018/08/01 2018/08/31
182675 201808 30 2018/09/01 2018/09/30

If I insert into the _dateperiodstructure_temp from  _dateperiodstructure
(via script) then it successfuly inserts all the records without any
duplicate key issues. But if I run "generate resource tables" then it only
partially creates  _dateperiodstructure_temp and stops at acertain point
and displys the error.

I had a look at the logs ... please find attached....but the logs did not
provide any more clarity.

Has anyone experienced this before and found a solution?


Regards

*Ant Snyman*

*Cell: 0824910449*

*Landline: 028 2713242*


Health Information Systems Program - SA

-- 


*This message and any attachments are subject to a disclaimer published

at http://www.hisp.org/policies.html#comms_disclaimer 
<http://www.hisp.org/policies.html#comms_disclaimer>. 
Please read the 
disclaimer before opening any attachment or taking any other
action in 
terms of this electronic transmission.  If you cannot access the

disclaimer, kindly send an email to disclai...@hisp.org 
<mailto:disclai...@hisp.org> and a copy will be provided to you. By

replying to this e-mail or opening any attachment you agree to be bound by 
the
provisions of the disclaimer.*

Attachment: Logs.log
Description: Binary data

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to