Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038408Openbravo ERPA. Platformpublic2018-04-19 09:282018-04-27 09:07
alostale 
alostale 
normalminoralways
closedfixed 
5
 
3.0PR18Q23.0PR18Q2 
caristu
Core
No
0038408: error message activating heartbeat in PG10
When trying to activate Heartbeat in an instance with PostgreSQL 10, an error message is displayed and heartbeat log is not saved in local DB although beat is correctly sent and saved in heartbeat server.
1. Log in as System Admin
2. Open Heartbeat Configuration window
3. Click on Enable Heartbeat button
  -> ERROR: databaseVersion: Value (10.3 (Ubuntu 10.3-1.pgdg16.04+1)) is too long
Starting from PostgreSQL 10, server_version information includes not only version itself but also the package it is installed from, example:

PG 10
show server_version;
          server_version
----------------------------------
 10.3 (Ubuntu 10.3-1.pgdg16.04+1)
(1 row)


PG 9
show server_version;
 server_version
----------------
 9.3.21
(1 row)

This issue can be fixed by one of these:

1. Parse version to remove package information
2. Keep package information and extend column size to support it: not in this case will cause a formal API change
No tags attached.
blocks defect 0038407 closed alostale error message activating heartbeat in PG10 
Issue History
2018-04-19 09:31alostaleTypedefect => backport
2018-04-19 09:31alostaleTarget Version => 3.0PR18Q2
2018-04-19 12:23hgbotCheckin
2018-04-19 12:23hgbotNote Added: 0103992
2018-04-19 12:23hgbotStatusscheduled => resolved
2018-04-19 12:23hgbotResolutionopen => fixed
2018-04-19 12:23hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR18Q2/rev/1b0988f4ec7fc8c12c2a0438a7caf3552a12a91e [^]
2018-04-27 09:07caristuNote Added: 0104119
2018-04-27 09:07caristuStatusresolved => closed
2018-04-27 09:07caristuFixed in Version => 3.0PR18Q2

Notes
(0103992)
hgbot   
2018-04-19 12:23   
Repository: erp/backports/3.0PR18Q2
Changeset: 1b0988f4ec7fc8c12c2a0438a7caf3552a12a91e
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Apr 19 12:09:11 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q2/rev/1b0988f4ec7fc8c12c2a0438a7caf3552a12a91e [^]

fixes 38408: error message activating heartbeat in PG10

  Starting from PostgreSQL 10, server version string includes also package, being
  a longer String it doesn't fit current column size.

  Fixed by getting just the first word of the version (which is the actual server
  version) skipping the rest that refers to the package.

  Examples:

   9.3.21 -> 9.3.21
   10.3 (Ubuntu 10.3-1.pgdg16.04+1) -> 10.3
   11devel (Debian 11~~devel~20180418.2231-1~573.git5372c2c.pgdg90+1) -> 11devel

---
M src/org/openbravo/erpCommon/utility/SystemInfo.java
---
(0104119)
caristu   
2018-04-27 09:07   
Reviewed