I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012_yearly_check”’
Any suggestions on this will be highly appreciated.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.
What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.
What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.
What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.
What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.
What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.
What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.
Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.
I was looking into the server logs and I have following analysis :
When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)
biweekly
2013BiW0
monthly
201301
bimonthly
201301B
quarterly
2013Q1
sixmonthly
2013S1
sixmonthlyapril
2012AprilS2
yearly
2013
financialapril
2012April
financialjuly
2012July
financialoct
2012Oct
startdate
2012-12-31
enddate
2013-01-06
year
2012
Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.
This seems to be bug on DHIS. Can you please confirm this.
What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.
Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.
I was looking into the server logs and I have following analysis :
When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)
biweekly
2013BiW0
monthly
201301
bimonthly
201301B
quarterly
2013Q1
sixmonthly
2013S1
sixmonthlyapril
2012AprilS2
yearly
2013
financialapril
2012April
financialjuly
2012July
financialoct
2012Oct
startdate
2012-12-31
enddate
2013-01-06
year
2012
Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.
This seems to be bug on DHIS. Can you please confirm this.
What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.
What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.
Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.
I was looking into the server logs and I have following analysis :
When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)
biweekly
2013BiW0
monthly
201301
bimonthly
201301B
quarterly
2013Q1
sixmonthly
2013S1
sixmonthlyapril
2012AprilS2
yearly
2013
financialapril
2012April
financialjuly
2012July
financialoct
2012Oct
startdate
2012-12-31
enddate
2013-01-06
year
2012
Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.
This seems to be bug on DHIS. Can you please confirm this.
What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.
Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.
I was looking into the server logs and I have following analysis :
When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)
biweekly
2013BiW0
monthly
201301
bimonthly
201301B
quarterly
2013Q1
sixmonthly
2013S1
sixmonthlyapril
2012AprilS2
yearly
2013
financialapril
2012April
financialjuly
2012July
financialoct
2012Oct
startdate
2012-12-31
enddate
2013-01-06
year
2012
Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.
This seems to be bug on DHIS. Can you please confirm this.
What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.
Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.
I was looking into the server logs and I have following analysis :
When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)
biweekly
2013BiW0
monthly
201301
bimonthly
201301B
quarterly
2013Q1
sixmonthly
2013S1
sixmonthlyapril
2012AprilS2
yearly
2013
financialapril
2012April
financialjuly
2012July
financialoct
2012Oct
startdate
2012-12-31
enddate
2013-01-06
year
2012
Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.
This seems to be bug on DHIS. Can you please confirm this.
What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.
Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
Skype: knutstar
I’ve had this “exception during execution” failures happening many times, with a multitude of reasons. In general, it’s caused by either a data issue - some data is “discrepant” compared to the meta-data - or it can be caused by meta-data discrepancies (some times temporary).
The last time I had it - for the Sierra Leone HMIS last week - a simple use of Maintenance->Reload apps fixed it.
In other cases I’ve fixed it by manually deleting all the resource tables (those starting with _ in the name) and re-creating them by using Maintenance->Resource tables (your _periodstructure table might contain some rubbish)
I’ve also had cases where deleting all analytics tables and resource tables and then re-start fixed the problem.
If _periodstructure contains garbage, it might originate from the period table - so check that too (sort on periodtype, and ensure that all records have start/end dates coherent with the periodtype)
Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
Skype: knutstar
Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.
I was looking into the server logs and I have following analysis :
When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)
biweekly
2013BiW0
monthly
201301
bimonthly
201301B
quarterly
2013Q1
sixmonthly
2013S1
sixmonthlyapril
2012AprilS2
yearly
2013
financialapril
2012April
financialjuly
2012July
financialoct
2012Oct
startdate
2012-12-31
enddate
2013-01-06
year
2012
Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.
This seems to be bug on DHIS. Can you please confirm this.
What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.
Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
Skype: knutstar
Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.
I was looking into the server logs and I have following analysis :
When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)
biweekly
2013BiW0
monthly
201301
bimonthly
201301B
quarterly
2013Q1
sixmonthly
2013S1
sixmonthlyapril
2012AprilS2
yearly
2013
financialapril
2012April
financialjuly
2012July
financialoct
2012Oct
startdate
2012-12-31
enddate
2013-01-06
year
2012
Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.
This seems to be bug on DHIS. Can you please confirm this.
What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.
Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
Skype: knutstar
Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.
I was looking into the server logs and I have following analysis :
When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)
biweekly
2013BiW0
monthly
201301
bimonthly
201301B
quarterly
2013Q1
sixmonthly
2013S1
sixmonthlyapril
2012AprilS2
yearly
2013
financialapril
2012April
financialjuly
2012July
financialoct
2012Oct
startdate
2012-12-31
enddate
2013-01-06
year
2012
Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.
This seems to be bug on DHIS. Can you please confirm this.
What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.
Yes, this was fixed two days back. I saw some new commits were made in 2.29. I have taken the latest commit and now I see that the issue is resolved.
Thanks for inputs !!
Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
Skype: knutstar
Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.
I was looking into the server logs and I have following analysis :
When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)
biweekly
2013BiW0
monthly
201301
bimonthly
201301B
quarterly
2013Q1
sixmonthly
2013S1
sixmonthlyapril
2012AprilS2
yearly
2013
financialapril
2012April
financialjuly
2012July
financialoct
2012Oct
startdate
2012-12-31
enddate
2013-01-06
year
2012
Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.
This seems to be bug on DHIS. Can you please confirm this.
What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.
I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.
I am not able to run analytics. Analytics fails with below error(captured in screenshot)
When I checked server logs. I got this exception :
org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’
Any suggestions on this will be highly appreciated.