Author Topic: Can't setup an EA database in Postgres - it's always worked before  (Read 2973 times)

bknoth2

  • EA User
  • **
  • Posts: 129
  • Karma: +2/-0
    • View Profile
EA version 15.2

Note: I have set up at least three Postgres-hosted (rev 11.2) EA databases before with no problems. Now...

I had a new (Rev 13.2) Postgres DB server and database setup for EA. I ran the new EASchema_1558_PostgreSQL.sql script to create the schema and the EABase_1220_Postgres to load configuration data. I set up ODBC for Postgres per the instructions. EA hangs when I start it.

I repeated above process using the EASchema_1220_PostgreSQL.sql script in a clean DB and uploading the EABase model and the problem persists.

I pasted possibly-useful info from the ODBC log below.

Any insights?
Thanks
Bruce

[11.874]conn=1CF75518, query='SAVEPOINT _EXEC_SVP_1ACA6458'
[11.887]STATEMENT ERROR: func=SC_execute, desc='(null)', errnum=7, errmsg='Error while executing the query'
[11.889]                 ------------------------------------------------------------
[11.891]                 hdbc=1CF75518, stmt=1ACA6458, result=1CF056A8
[11.893]                 prepare=2, internal=1
[11.894]                 bindings=00000000, bindings_allocated=0
[11.895]                 parameters=00000000, parameters_allocated=0
[11.897]                 statement_type=0, statement='select n.nspname, c.relname, a.attname, a.atttypid, t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull, c.relhasrules, c.relkind, c.oid, pg_get_expr(d.adbin, d.adrelid), case t.typtype when 'd' then t.typbasetype else 0 end, t.typtypmod, c.relhasoids from (((pg_catalog.pg_class c inner join pg_catalog.pg_namespace n on n.oid = c.relnamespace and c.oid = 18167) inner join pg_catalog.pg_attribute a on (not a.attisdropped) and a.attnum > 0 and a.attrelid = c.oid) inner join pg_catalog.pg_type t on t.oid = a.atttypid) left outer join pg_attrdef d on a.atthasdef and d.adrelid = a.attrelid and d.adnum = a.attnum order by n.nspname, c.relname, attnum'
[11.913]                 stmt_with_params='select n.nspname, c.relname, a.attname, a.atttypid, t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull, c.relhasrules, c.relkind, c.oid, pg_get_expr(d.adbin, d.adrelid), case t.typtype when 'd' then t.typbasetype else 0 end, t.typtypmod, c.relhasoids from (((pg_catalog.pg_class c inner join pg_catalog.pg_namespace n on n.oid = c.relnamespace and c.oid = 18167) inner join pg_catalog.pg_attribute a on (not a.attisdropped) and a.attnum > 0 and a.attrelid = c.oid) inner join pg_catalog.pg_type t on t.oid = a.atttypid) left outer join pg_attrdef d on a.atthasdef and d.adrelid = a.attrelid and d.adnum = a.attnum order by n.nspname, c.relname, attnum'
[11.928]                 data_at_exec=-1, current_exec_param=-1, put_data=0
[11.930]                 currTuple=-1, current_col=-1, lobj_fd=-1
[11.931]                 maxRows=0, rowset_size=1, keyset_size=0, cursor_type=0, scroll_concurrency=1
[11.933]                 cursor_name='SQL_CUR1ACA6458'
[11.934]                 ----------------QResult Info -------------------------------
[11.936]                 fields=13C86638, backend_tuples=00000000, tupleField=0, conn=00000000
[11.938]                 fetch_count=0, num_total_rows=0, num_fields=0, cursor='(NULL)'
[11.940]                 message='ERROR: column c.relhasoids does not exist', command='(NULL)', notice='(NULL)'
[11.943]                 status=7
[11.944]CONN ERROR: func=SC_execute, desc='(null)', errnum=110, errmsg='Could not allocate memory for output buffer'
[11.946]            ------------------------------------------------------------
[11.948]            henv=13E28698, conn=1CF75518, status=1, num_stmts=16
[11.950]            pqconn=17B93708, stmts=1CE967D8, lobj_type=17525
[11.951]conn=1CF75518, query='ROLLBACK to _EXEC_SVP_1ACA6458'
[11.958]conn=1CF75518, query='RELEASE _EXEC_SVP_1ACA6458'
[11.966]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[11.973]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[11.985]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[11.999]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[12.012]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[12.024]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[12.036]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[12.049]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[12.061]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[12.073]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[12.086]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[12.098]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[12.110]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[12.123]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[12.135]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[12.147]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[12.160]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
[12.172]conn=1CF75518, query='close "SQL_CUR1ACA25C8"'
...these messages repeat forever





bknoth2

  • EA User
  • **
  • Posts: 129
  • Karma: +2/-0
    • View Profile
Re: Can't setup an EA database in Postgres - it's always worked before
« Reply #1 on: March 31, 2021, 06:58:10 am »
I figured it out. There's a bug in the EASchema_1558_PostgreSQL.sql script (and probably in the EASchema_1220_PostgreSQL.sql). I added the line noted below so the script wouldn't stop running if the "CREATE" line failed in the sql tool I use. Then the script ran through to completion and things worked out.

(There was a larger sequence of events, including updating the ODBC driver for Postgres, but the missing sql line could cause problems for others under the right circumstances).

----------------------------------------------
-- Create LO Domain for blobs
----------------------------------------------
DROP DOMAIN IF EXISTS LO;    <---- Added this line
CREATE DOMAIN LO AS OID;