← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] Error when upgrading DHIS2 from 2.29 to 2.30 - relationships

 

Also in order to detect the problems in other permissions on other tables I ran this query:

SELECT *

FROM pg_tables t

WHERE t.tableowner <> 'dhis' – dhis is my DHIS2 db user

and schemaname = 'public';

 

I discovered there’s also the table public.spatial_ref_sys that was not under my dhis db user, so I altered its owner too.

Thanks for the help.

 

All the best,

Bernard

 




Bernard Sadaka

Information Management Advisor

Première Urgence - Aide Médicale Internationale

Nehmeh Building, Sanine Street, Chiyah, 3rd Floor

Ain el Remmaneh, Beirut, Lebanon

E-mail:  <mailto:lib.ima@xxxxxxxxxx> lib.ima@xxxxxxxxxx 

Cell: +961 71 004 881 (208)

Skype: imapuami

Website:  <https://www.pu-ami.org/> https://www.pu-ami.org

 

 

From: Stian Sandvold [mailto:stian@xxxxxxxxx] 
Sent: Monday, September 17, 2018 03:28 PM
To: Bob Jolliffe <bobjolliffe@xxxxxxxxx>
Cc: lib.ima@xxxxxxxxxx; DHIS 2 Users list <dhis2-users@xxxxxxxxxxxxxxxxxxx>; DHIS 2 Developers list <dhis2-devs@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Dhis2-users] [Dhis2-devs] Error when upgrading DHIS2 from 2.29 to 2.30 - relationships

 

Did the sql fix your issues or are you still having issues? The superuser and ownership is a tricky challenge since we dont know the name of the user, but aside from the postgis extension, the upgradescript should be runnable as a non-superuser if I remember correctly.

 

On Mon, Sep 17, 2018 at 12:36 PM Bob Jolliffe <bobjolliffe@xxxxxxxxx <mailto:bobjolliffe@xxxxxxxxx> > wrote:

Good point Bernard.  

 

Interestingly this is the reverse problem to that of creating the postgis extension. You have to be a superuser role in the database to create the postgis extension in the database.  But ...

 

If you have run the upgrade script from https://github.com/dhis2/dhis2-releases/blob/master/releases/2.30/upgrade-230.sql as a superuser (eg postgres) then you are going to be left with two new tables (and a function?) owned by the postgres user.

 

So you should, in fact, have to do afterwards both:

ALTER TABLE public.relationshipitem OWNER to dhis;

ALTER TABLE public.relationshipconstraint OWNER to dhis;

 

Which is a little messy :-)  But hard to figure the neatest way around because we cannot know in advance the name of the dhis db user.

 

Cheers

Bob 

 

On 17 September 2018 at 09:58, Bernard Sadaka (IM Advisor) <lib.ima@xxxxxxxxxx <mailto:lib.ima@xxxxxxxxxx> > wrote:

I faced this same error before: “'permission denied for relation XXX”

and I fixed it using this query in the DB:

 

ALTER TABLE public.relationshipitem OWNER to dhis;

 

Replace dhis with your DB user

 

All the best,

Bernard

 




Bernard Sadaka

Information Management Advisor

Première Urgence - Aide Médicale Internationale

Nehmeh Building, Sanine Street, Chiyah, 3rd Floor

Ain el Remmaneh, Beirut, Lebanon

E-mail:  <mailto:lib.ima@xxxxxxxxxx> lib.ima@xxxxxxxxxx 

Cell: +961 71 004 881 (208)

Skype: imapuami

Website:  <https://www.pu-ami.org/> https://www.pu-ami.org

 

 

From: Dhis2-users [mailto:dhis2-users-bounces+lib.ima <mailto:dhis2-users-bounces%2Blib.ima> =pu-ami.org@xxxxxxxxxxxxxxxxxxx <mailto:pu-ami.org@xxxxxxxxxxxxxxxxxxx> ] On Behalf Of Em Le Hong
Sent: Monday, September 17, 2018 11:51 AM
To: Shurajit Dutta <shurajitdutta@xxxxxxxxx <mailto:shurajitdutta@xxxxxxxxx> >; DHIS 2 Developers list <dhis2-devs@xxxxxxxxxxxxxxxxxxx <mailto:dhis2-devs@xxxxxxxxxxxxxxxxxxx> >
Cc: DHIS 2 Users list <dhis2-users@xxxxxxxxxxxxxxxxxxx <mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx> >
Subject: Re: [Dhis2-users] Error when upgrading DHIS2 from 2.29 to 2.30 - relationships

 

Hi all,

 

I got the same problem with Nick. 

It says 'permission denied for relation relationshipitem', 

 



 

On Tue, Sep 11, 2018 at 11:18 PM Shurajit Dutta <shurajitdutta@xxxxxxxxx <mailto:shurajitdutta@xxxxxxxxx> > wrote:

Hi everyone,

 

I am trying to upgrade a DHIS2 instance from 2.29 to 2.30. I have done this on a couple other instances successfully. The issue I seem to be having here is with the relationship types. In 2.29, I have the following relationships:

 



 

This changes to the following (as per the release notes this is expected) in 2.30:

 



 

There are a couple issues I seem to be running into. 

 

1. I can not seem to edit these relationship types at all (the log error says "permission denied for relation relationshipconstraint"

 



 

2. I can not seem to open any tracker programs in tracker capture (the log error says "permission denied for relation relationshipitem")

 



 

Has anyone encountered this error? Any suggestions on how to fix it?

 

Thanks

 

-- 

Shurajit Dutta (MPH, MHI)

Health Information Systems Adviser

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




 

-- 

Em Le Hong

DHIS2 Implementation| HISP Vietnam 

em.hispvietnam@xxxxxxxxx <mailto:em.hispvietnam@xxxxxxxxx>  | Skype:  <mailto:em.hispvietnam@xxxxxxxxx> em.hispvietnam@xxxxxxxxx

 



 

 

 


_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx <mailto:dhis2-devs@xxxxxxxxxxxxxxxxxxx> 
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

 

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




 

-- 

Stian Sandvold

Software developer, DHIS2

University of Oslo

http://www.dhis2.org

PNG image


Follow ups

References