Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028149
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2014-11-12 10:152017-01-24 16:30
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in Version3.0PR17Q1
StatusclosedFix in branchFixed in SCM revision85b09d433e7f
ProjectionnoneETAnoneTarget Version
OSAnyDatabasePostgreSQLJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028149: update.database tries to delete pg_stat_statments and pg_stat_statments_reset

Descriptionpg_stat_statments and pg_stat_statments_reset functions are tried to be deleted by update.database
Steps To Reproduce* Enable pg_stat_statments: http://wiki.openbravo.com/wiki/Finding_Perfomance_Issues#Tracking_SQL_Statements [^]
* run update.database. This appears in the logs:

     [java] 65011 WARN - SQL Command failed with: ERROR: cannot drop function pg_stat_statements_reset() because extension pg_stat_statements requires it
     [java] Hint: You can drop extension pg_stat_statements instead.
     [java] 65033 WARN - -- END
     [java] -- -----------------------------------------------------------------------
     [java] -- FUNCTION PG_STAT_STATEMENTS_RESET
     [java] -- -----------------------------------------------------------------------
     [java] DROP FUNCTION PG_STAT_STATEMENTS_RESET()
     [java] 65049 WARN - SQL Command failed with: ERROR: cannot drop function pg_stat_statements() because extension pg_stat_statements requires it
     [java] Hint: You can drop extension pg_stat_statements instead.
     [java] 65064 WARN - -- END
     [java] -- -----------------------------------------------------------------------
     [java] -- FUNCTION PG_STAT_STATEMENTS
     [java] -- -----------------------------------------------------------------------
     [java] DROP FUNCTION PG_STAT_STATEMENTS(userid OUT OID, dbid OUT OID, query OUT TEXT, calls OUT VARCHAR, total_time OUT VARCHAR, rows OUT VARCHAR, shared_blks_hit OUT VARCHAR, shared_blks_read OUT VARCHAR, shared_blks_dirtied OUT VARCHAR, shared_blks_written OUT VARCHAR, local_blks_hit OUT VARCHAR, local_blks_read OUT VARCHAR, local_blks_dirtied OUT VARCHAR, local_blks_written OUT VARCHAR, temp_blks_read OUT VARCHAR, temp_blks_written OUT VARCHAR, blk_read_time OUT VARCHAR, blk_write_time OUT VARCHAR)
     [java] 65080 WARN - SQL Command failed with: ERROR: function createorders(character varying, character varying, character varying, character varying, character varying, character varying) does not exist
     [java] 65125 WARN - -- END
Proposed SolutionThese are internal pg functions which should be skipped.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on feature request 0031685 closedAugustoMauch Allow using SQL wildcards in the dbsourmanager exclude filter 
related to feature request 0036089 acknowledgedplatform exclude from updates all DB objects created by extensions 

-  Notes
(0092399)
hgbot (developer)
2016-12-15 09:17

Repository: erp/devel/pi
Changeset: 85b09d433e7f9c1e5816c4c2663c31a39570c371
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Dec 15 09:15:56 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/85b09d433e7f9c1e5816c4c2663c31a39570c371 [^]

fixed bug 28149: PG extension functions are tried to be deleted on update DB

  Having some installed any PG extension that adds functions, they are tried to
  be deleted each time update.database is executed.

  Fixed by excluding any function named like PG_% which should be reserved for
  PG extension functions.

---
M src-db/database/model/excludeFilter.xml
---
(0092400)
alostale (developer)
2016-12-15 09:18

A fake module to reserve DB prefixes has been registered [1]. Currently including PG to prevent any other module to reserve it.

[1] http://centralrepository.openbravo.com/openbravo/org.openbravo.forge.ui/ForgeModuleDetail/Reserved-DB-Prefixes [^]
(0092430)
caristu (developer)
2016-12-16 08:38

Code review + testing OK: functions whose name starts with PG_ are now excluded during update.database.
(0092718)
hudsonbot (developer)
2016-12-16 18:39

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/dc8bf00badd0 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2014-11-12 10:15 alostale New Issue
2014-11-12 10:15 alostale Assigned To => inigosanchez
2014-11-12 10:15 alostale Modules => Core
2014-11-12 10:15 alostale Triggers an Emergency Pack => No
2015-03-11 11:10 alostale Priority normal => high
2015-03-11 11:10 alostale Status new => acknowledged
2015-03-17 14:37 alostale Assigned To inigosanchez => platform
2015-11-11 11:37 alostale Priority high => normal
2016-12-15 09:12 alostale Assigned To platform => alostale
2016-12-15 09:13 alostale Review Assigned To => caristu
2016-12-15 09:13 alostale Relationship added related to 0031685
2016-12-15 09:17 hgbot Checkin
2016-12-15 09:17 hgbot Note Added: 0092399
2016-12-15 09:17 hgbot Status acknowledged => resolved
2016-12-15 09:17 hgbot Resolution open => fixed
2016-12-15 09:17 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/85b09d433e7f9c1e5816c4c2663c31a39570c371 [^]
2016-12-15 09:18 alostale Note Added: 0092400
2016-12-16 08:38 caristu Note Added: 0092430
2016-12-16 08:38 caristu Status resolved => closed
2016-12-16 08:38 caristu Fixed in Version => 3.0PR17Q1
2016-12-16 18:39 hudsonbot Checkin
2016-12-16 18:39 hudsonbot Note Added: 0092718
2017-01-24 16:30 alostale Relationship replaced depends on 0031685
2017-05-24 15:16 alostale Relationship added related to 0036089


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker