Facing issue in generating resource table

Hi team,

We recently encountered an issue in generating resource tables. It would be of great help if, there any inputs from DHIS team/@dhis2-analytics team to resolve it. We have our servers on 2.26 version. Thought the version is not currently supported, some suggestion for the same, would really help us.

Context :
Our analytics jobs started failing, giving,

SQL [insert into _dateperiodstructure_temp values (?,?,?,?,?,?,?,?,?,?,?,?)]; ERROR: duplicate key value violates unique constraint “_dateperiodstructure_temp_pkey1”

we understood that it is Resource table that, while being generated, throws this error.

We have tried the following,

  1. Clear analytics cache - didn’t’ help.

  2. From Data Administration → maintenance, try to generate resource tables - this again threw the same error.

  3. we tried to drop the table directly from db (_dateperiodstructure) and then tried to generate the resource table. - this also threw the same error.

Is it anything else that we can try, to resolve this. Some insights on this would help.

Thanks,

1 Like

Hi @swetha,

Great to have you in the Community!

My colleague @Emma_Kassy will check it out as other members also contribute to sorting your issue.

Best,
James.

Hi Swetha,

this issue has been fixed in later versions, I think from 2.28 and above (not fully sure). Please attempt an upgrade of your system.

regards,

Lars

1 Like

Thank you for the update @Lars!

Best,
James.

Thanks a lot for the response, @jomutsani & @Lars . Is there any work around for the same, as this is happening on our prod environment and immediate upgrade is not possible for us now.

1 Like