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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0040842
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2019-05-10 16:152019-05-27 17:33
ReportershuehnerView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in Version3.0PR19Q3
StatusclosedFix in branchFixed in SCM revision19bd63f27cc6
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava 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

0040842: Error on create.database with PG12 (prescript views user_constraints + user_tab_columns) use removed attributes

DescriptionRunning ant create.database against PG12 (devel) has 2 views from prescript-PostgreSql.sql failing to create

a.) user_constraint

[createdatabase] 3737 [main] WARN org.apache.ddlutils.platform.PGStandardBatchEvaluator - SQL Command failed with: ERROR: column pg_constraint.consrc doe
[createdatabase] Hint: Perhaps you meant to reference the column "pg_constraint.conkey" or the column "pg_constraint.conbin".
[createdatabase] Position: 1513

b.) user_tab_columns
[createdatabase] 3752 [main] WARN org.apache.ddlutils.platform.PGStandardBatchEvaluator - SQL Command failed with: ERROR: column pg_attrdef.adsrc does no
[createdatabase] Position: 1450
Steps To Reproduce-
Proposed Solution- Check if the 2 internal views which are created to match existing oracle system views can be removed
- If not they need to be adapted to work with the removed postgres system catalog attributes

Known users:
1.) At least the user_constraints view is used in ErrorTextParser_data.xsql/.java file
2.) postgrescript function ad_script_drop_recreate_index
That function should probably be removed.
Afaik never called automatically and at least on postgres 'reindex' command exists to do the same
Note that removal could cascade to utility table ad_script_sql -> however that could be used by modules (even if basic structure for the table some years ago was used as 'useful' in some customer scripts
3.) SessionFactoryController
- usage could be maybe rewritten
4.) AD_ALERTRULE 'Disabled constraints': 1000008, isactive=N
- Should probably be more a compile time tool then alert
- Similar to related alertrule
- careful that is adrd not ad
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0040843 closedalostale update.database "Reading tables..." fails with PG12 -> pg_attrdef.adsrc does not exists 
blocks feature request 0040841 closedshuehner support PostgreSQL 12 

-  Notes
(0111628)
shuehner (administrator)
2019-05-10 16:35

For first issue:
https://git.postgresql.org/gitweb/?p=postgresql.git&a=search&h=HEAD&st=commit&s=consrc [^]

Apparently the consrc attribute is deprecated since 2003 and a pg-function is available as replacement since back then.

for 2nd case:
https://git.postgresql.org/gitweb/?p=postgresql.git&a=search&h=HEAD&st=commit&s=consrc [^]

Similarly was marked as 'should not be used' with a catalog function available.

Good news:
If those replacement functions can be used and are available long time no conditional needs to be added to support old/new postgres.
(0111640)
hgbot (developer)
2019-05-13 12:55

Repository: erp/devel/pi
Changeset: 19bd63f27cc6971c671fb623a1e2cb56450727df
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon May 13 12:47:39 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/19bd63f27cc6971c671fb623a1e2cb56450727df [^]

fixed bug 40842: install.source fails with PostgreSQL 12

  It was failing on prescript creation as it makes use of two columns that have
  been removed in PostgreSQL 12 (pg_attrdef.adsrc, pg_constraint.consrc).

  They have been replaced by pg_get_expr and pg_get_constraintdef functions which
  are present in all supported PG versions.

---
M src-db/database/model/prescript-PostgreSql.sql
---
(0111643)
hgbot (developer)
2019-05-13 14:41

Repository: erp/devel/pi
Changeset: 39feb7c057960887a8ab266c4b8f69844255403c
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon May 13 14:40:35 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/39feb7c057960887a8ab266c4b8f69844255403c [^]

related to issue 40842: fixes dba_getstandard_search_text

  pg_get_constraintdef includes "CHECK()" to check conditions, remove it to keep
  backwards compatibility

---
M src-db/database/model/prescript-PostgreSql.sql
---
(0112027)
hudsonbot (developer)
2019-05-21 15:17

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/9b8f37d9d85e [^]
Maturity status: Test
(0112029)
hudsonbot (developer)
2019-05-21 15:17

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/9b8f37d9d85e [^]
Maturity status: Test
(0112180)
caristu (developer)
2019-05-27 17:33

Reviewed + tested OK.

Executed also DBSMTestSuite without errors.

- Issue History
Date Modified Username Field Change
2019-05-10 16:15 shuehner New Issue
2019-05-10 16:15 shuehner Assigned To => platform
2019-05-10 16:15 shuehner Modules => Core
2019-05-10 16:15 shuehner Triggers an Emergency Pack => No
2019-05-10 16:16 shuehner Relationship added blocks 0040841
2019-05-10 16:35 shuehner Note Added: 0111628
2019-05-10 16:36 shuehner Relationship added related to 0040843
2019-05-13 12:52 alostale Assigned To platform => alostale
2019-05-13 12:53 alostale Review Assigned To => caristu
2019-05-13 12:55 hgbot Checkin
2019-05-13 12:55 hgbot Note Added: 0111640
2019-05-13 12:55 hgbot Status new => resolved
2019-05-13 12:55 hgbot Resolution open => fixed
2019-05-13 12:55 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/19bd63f27cc6971c671fb623a1e2cb56450727df [^]
2019-05-13 14:41 hgbot Checkin
2019-05-13 14:41 hgbot Note Added: 0111643
2019-05-21 15:17 hudsonbot Checkin
2019-05-21 15:17 hudsonbot Note Added: 0112027
2019-05-21 15:17 hudsonbot Checkin
2019-05-21 15:17 hudsonbot Note Added: 0112029
2019-05-27 17:33 caristu Note Added: 0112180
2019-05-27 17:33 caristu Status resolved => closed
2019-05-27 17:33 caristu Fixed in Version => 3.0PR19Q3


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker