Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030338Openbravo ERPA. Platformpublic2015-07-10 12:492015-07-20 08:12
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
3.0PR15Q4 
alostale
Core
No
0030338: New postgresql 9.5alpha1 has remove pg_authid.rolcatupdate column changed in openbravo install.source
Openbravo postgres database user creation done during install.source in src-db/database/build-create.xml has the following extra sql after creating the user (as db superuser)

UPDATE pg_authid SET rolcatupdate=true WHERE rolname='${bbdd.user}';

That column is to give that user extra permission going being normal superuser.

It was used a long time ago by core code to disable triggers+fk's without deleting them.

But no known user is known.

Postgres 9.5 now deleted this column as its usefulness was unclear

http://www.postgresql.org/docs/devel/static/release-9-5.html [^]
Remove pg_authid's rolcatupdate field, as it had no value (Adam Brightwell)

However it should be fine to just delete the custom sql from build-create.xml for 2 reasons:
1.) It was not doing anything useful already before as the defaultvalue for rolcatupdate was true already if user is a superuser for all pg versions supported by openbravo
2.) Now normal superuser privs are sufficient to do the same action in case some code should still rely on that.


To check this reason1 a 'create user test superuser' + select * from pg_authid i.e. on pg9.1 can be done to verify that default true value.
Run install.source with postgresql 9.5alpha1

      [sql] Failed to execute: UPDATE pg_authid SET rolcatupdate=true WHERE rolname='try_full_pgsql'
      [sql] org.postgresql.util.PSQLException: ERROR: column "rolcatupdate" of relation "pg_authid" does not exist
Remove the extra SQL modifying that now deleted column.
No tags attached.
Issue History
2015-07-10 12:49shuehnerNew Issue
2015-07-10 12:49shuehnerAssigned To => platform
2015-07-10 12:49shuehnerModules => Core
2015-07-10 12:49shuehnerTriggers an Emergency Pack => No
2015-07-10 12:49shuehnerAssigned Toplatform => shuehner
2015-07-13 13:55hgbotCheckin
2015-07-13 13:55hgbotNote Added: 0078775
2015-07-13 13:55hgbotStatusnew => resolved
2015-07-13 13:55hgbotResolutionopen => fixed
2015-07-13 13:55hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b7bb9b8e82c4430bf99e32c4e1bf2ad9784524a2 [^]
2015-07-13 14:09shuehnerReview Assigned To => alostale
2015-07-16 12:03gorka_gilFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/b7bb9b8e82c4430bf99e32c4e1bf2ad9784524a2 [^] => http://code.openbravo.com/erp/devel/pi/rev/f1de6735fa9f [^]
2015-07-16 12:03gorka_gilNote Edited: 0078775bug_revision_view_page.php?bugnote_id=0078775#r9050
2015-07-20 08:12alostaleNote Added: 0078946
2015-07-20 08:12alostaleStatusresolved => closed
2015-07-20 08:12alostaleFixed in Version => 3.0PR15Q4

Notes
(0078775)
hgbot   
2015-07-13 13:55   
(edited on: 2015-07-16 12:03)
Repository: erp/devel/pi
Changeset: f1de6735fa9f
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Fri Jul 10 12:53:42 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f1de6735fa9f [^]

Fixed 30338: Remove not needed pg_authid.rolcatupdate sql to fix pg9.5

Postgresql 9.5 did remove the pg_authid.rolcatupdate column which is
explicitely set during db user creation by openbravo.
As that change is not needed anyway just delete the sql. It is not needed
as value for that boolean defaults to true for db superuser's anyway.

---
M src-db/database/build-create.xml
---

(0078946)
alostale   
2015-07-20 08:12   
Code reviewed.

Tested:
-Pg 9.5: no error message is shown in create.database
-Pg 9.3: works fine, not found anywhere this setting was needed