Menu

#2140 dba_free_space does not exists on postgres

closed-fixed
Database (55)
5
2009-12-31
2009-09-29
No

Hi,

I got the following on startup:
1.
COUNT (*) AS Pieces,
2.
SUM (bytes)/1024/1024 Free_MB,
3.
MAX (bytes)/1024 Largest_kB,
4.
ROUND(MAX (bytes) / SUM (bytes),2) * 100 Ratio,
5.
SUM (blocks) Free_Blocks,
6.
MAX (blocks) Largest_Blocks,
7.
ROUND(SQRT (MAX (blocks) / SUM (blocks)) * (100 / SQRT (SQRT (COUNT (blocks)))),2) Fragmentation_Index FROM DBA_Free_Space GROUP BY Tablespace_Name [13]
8.
org.postgresql.util.PSQLException: FEHLER: Relation »dba_free_space« existiert nicht; State=42P01; ErrorCode=0
9.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
10.
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)
11.
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
12.
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
13.
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
14.
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:255)
15.
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
16.
at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
17.
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
18.
at java.lang.reflect.Method.invoke(Method.java:597)
19.
at org.compiere.db.StatementProxy.invoke(StatementProxy.java:100)
20.
at $Proxy67.executeQuery(Unknown Source)
21.
at org.compiere.server.AlertProcessor.getData(AlertProcessor.java:312)
22.
at org.compiere.server.AlertProcessor.getExcelReport(AlertProcessor.java:425)
23.
at org.compiere.server.AlertProcessor.processAlert(AlertProcessor.java:169)
24.
at org.compiere.server.AlertProcessor.doWork(AlertProcessor.java:96)
25.
at org.compiere.server.AdempiereServer.run(AdempiereServer.java:229)

This seems be the query that is in AD_AlertRule.

Discussion

  • Teo Sarca

    Teo Sarca - 2009-09-29

    Hi Felix,

    Thanks for opening the discussion about database dictionary specific tables like dba_free_space, user_objects etc. I am wondering if we can build some common views which look the same on oracle and PG but have proper implementation. In this way I think we can make a step forward to database independence.

    WDYT?

    Best regards,
    Teo Sarca

     
  • Trifon (An ADempiere founder)

    Hi,

    Fix committed with SVN Revision: 10426
    http://adempiere.svn.sourceforge.net/adempiere/?rev=10426&view=rev

    @Teo, i agree. But i suppose it would take some time till we managed to get all this solved.
    For now i just disabled this alert in the PostgreDB seed.

    Regards,
    Trifon
    www.catura.de

     
  • Trifon (An ADempiere founder)

    • assigned_to: nobody --> trifonnt
    • labels: --> Database
    • status: open --> pending-fixed
     
  • Felix Möller

    Felix Möller - 2009-10-09

    I am still hit by this issue in r10553:

    11:00:31,990 ERROR [STDERR] -----------> MClient.sendEmailNow: Could NOT Send Email: Inactivity Alert: Request 10000002 to admin @ gardenworld.com: Invalid Data (GardenWorld) [12]
    11:02:31,602 ERROR [STDERR] ===========> AlertProcessor.getData: SELECT Tablespace_Name,
    COUNT (*) AS Pieces,
    SUM (bytes)/1024/1024 Free_MB,
    MAX (bytes)/1024 Largest_kB,
    ROUND(MAX (bytes) / SUM (bytes),2) * 100 Ratio,
    SUM (blocks) Free_Blocks,
    MAX (blocks) Largest_Blocks,
    ROUND(SQRT (MAX (blocks) / SUM (blocks)) * (100 / SQRT (SQRT (COUNT (blocks)))),2) Fragmentation_Index FROM DBA_Free_Space GROUP BY Tablespace_Name [13]
    org.postgresql.util.PSQLException: ERROR: relation "dba_free_space" does not exist; State=42P01; ErrorCode=0
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:255)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
    at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.compiere.db.StatementProxy.invoke(StatementProxy.java:100)
    at $Proxy67.executeQuery(Unknown Source)
    at org.compiere.server.AlertProcessor.getData(AlertProcessor.java:312)
    at org.compiere.server.AlertProcessor.getExcelReport(AlertProcessor.java:425)
    at org.compiere.server.AlertProcessor.processAlert(AlertProcessor.java:169)
    at org.compiere.server.AlertProcessor.doWork(AlertProcessor.java:96)
    at org.compiere.server.AdempiereServer.run(AdempiereServer.java:229)
    11:02:31,637 ERROR [STDERR] ===========> AlertProcessor.getData: SELECT Tablespace_Name,
    COUNT (*) AS Pieces,
    SUM (bytes)/1024/1024 Free_MB,
    MAX (bytes)/1024 Largest_kB,
    ROUND(MAX (bytes) / SUM (bytes),2) * 100 Ratio,
    SUM (blocks) Free_Blocks,
    MAX (blocks) Largest_Blocks,
    ROUND(SQRT (MAX (blocks) / SUM (blocks)) * (100 / SQRT (SQRT (COUNT (blocks)))),2) Fragmentation_Index FROM DBA_Free_Space GROUP BY Tablespace_Name [13]
    org.postgresql.util.PSQLException: ERROR: relation "dba_free_space" does not exist; State=42P01; ErrorCode=0
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:255)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
    at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.compiere.db.StatementProxy.invoke(StatementProxy.java:100)
    at $Proxy67.executeQuery(Unknown Source)
    at org.compiere.server.AlertProcessor.getData(AlertProcessor.java:312)
    at org.compiere.server.AlertProcessor.getExcelReport(AlertProcessor.java:425)
    at org.compiere.server.AlertProcessor.processAlert(AlertProcessor.java:169)
    at org.compiere.server.AlertProcessor.doWork(AlertProcessor.java:96)
    at org.compiere.server.AdempiereServer.run(AdempiereServer.java:229)
    11:03:31,739 ERROR [STDERR] -----------> MClient.createEMail: No To address: MUser[0,Name=null,EMailUserID=null] [14]
    11:03:31,741 ERROR [STDERR] -----------> MClient.createEMail: No To address: MUser[0,Name=null,EMailUserID=null] [14]

    Hall migration scripts have been executed beofre.

    regards
    Felix

     
  • Felix Möller

    Felix Möller - 2009-10-09
    • status: pending-fixed --> open
     
  • Carlos Ruiz

    Carlos Ruiz - 2009-12-16
    • status: open --> pending-fixed
     
  • SourceForge Robot

    • status: pending-fixed --> closed-fixed
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.