Bug #23192

installation fails with postgresql => 9.6 external database

Added by Ales Dujicek over 4 years ago. Updated over 4 years ago.

Target version:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:


foreman-installer fails when you use postgresql >= 9.6

# foreman-installer --scenario katello --foreman-admin-password changeme --foreman-db-manage false --foreman-db-host  localhost --foreman-db-database foreman7db --foreman-db-username foreman7 --foreman-db-password foreman7pw --foreman-db-port     5432 --katello-candlepin-manage-db false --katello-candlepin-db-host localhost --katello-candlepin-db-name     candlepin7db --katello-candlepin-db-user     candlepin7 --katello-candlepin-db-password candlepin7pw --katello-candlepin-db-port     5432
[DEBUG 2018-04-09T07:31:20 main]  Exec[cpdb](provider=posix): Executing 'cpdb --create                        --schema-only                        --dbhost=localhost                        --dbport=8432                        --database=candlepin7db                        --user=candlepin7                         --password=candlepin7pw                        >> /var/log/candlepin/cpdb.log                        2>&1 && touch /var/lib/candlepin/cpdb_done'
[DEBUG 2018-04-09T07:31:20 main]  Executing: 'cpdb --create                        --schema-only                        --dbhost=localhost                        --dbport=8432                        --database=candlepin7db                        --user=candlepin7                         --password=candlepin7pw                        >> /var/log/candlepin/cpdb.log                        2>&1 && touch /var/lib/candlepin/cpdb_done'
[ERROR 2018-04-09T07:31:21 main]  'cpdb --create                        --schema-only                        --dbhost=localhost                        --dbport=8432                        --database=candlepin7db                        --user=candlepin7                         --password=candlepin7pw                        >> /var/log/candlepin/cpdb.log                        2>&1 && touch /var/lib/candlepin/cpdb_done' returned 1 instead of one of [0]


Related issues

Related to Katello - Feature #19667: Need additional supported database deployment options for Katello installation: such as External PostgresClosed2017-05-25


#1 Updated by Ales Dujicek over 4 years ago


Caused by: org.postgresql.util.PSQLException: ERROR: column am.amcanorder does not exist
  Position: 407
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(
        at org.postgresql.core.v3.QueryExecutorImpl.execute(
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(
        at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getIndexInfo(
        at liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData$2.fastFetch(Unknown Source)
        ... 22 more

ERROR:  column am.amcanorder does not exist at character 407
STATEMENT:  SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM,   ct.relname AS TABLE_NAME, NOT i.indisunique AS NON_UNIQUE,   NULL AS INDEX_QUALIFIER, ci.relname AS INDEX_NAME,   CASE i.indisclustered     WHEN true THEN 1    ELSE CASE am.amname       WHEN 'hash' THEN 2      ELSE 3    END   END AS TYPE,   (i.keys).n AS ORDINAL_POSITION,   pg_catalog.pg_get_indexdef(ci.oid, (i.keys).n, false) AS COLUMN_NAME,   CASE am.amcanorder     WHEN true THEN CASE i.indoption[(i.keys).n - 1] & 1       WHEN 1 THEN 'D'       ELSE 'A'     END     ELSE NULL   END AS ASC_OR_DESC,   ci.reltuples AS CARDINALITY,   ci.relpages AS PAGES,   pg_catalog.pg_get_expr(i.indpred, i.indrelid) AS FILTER_CONDITION FROM pg_catalog.pg_class ct   JOIN pg_catalog.pg_namespace n ON (ct.relnamespace = n.oid)   JOIN (SELECT i.indexrelid, i.indrelid, i.indoption,           i.indisunique, i.indisclustered, i.indpred,           i.indexprs,           information_schema._pg_expandarray(i.indkey) AS keys         FROM pg_catalog.pg_index i) i     ON (ct.oid = i.indrelid)   JOIN pg_catalog.pg_class ci ON (ci.oid = i.indexrelid)   JOIN pg_catalog.pg_am am ON (ci.relam = am.oid) WHERE true  AND n.nspname = 'public' AND ct.relname = 'cp2_activation_key_products' ORDER BY NON_UNIQUE, TYPE, INDEX_NAME, ORDINAL_POSITION


#2 Updated by Ales Dujicek over 4 years ago

  • Related to Feature #19667: Need additional supported database deployment options for Katello installation: such as External Postgres added

#3 Updated by Justin Sherrill over 4 years ago

  • Assignee set to John Mitsch
  • Category set to 78

This is likely a candlepin bug. we will reach out to them to make sure they are aware of it.

#5 Updated by Evgeni Golov over 4 years ago

That's not a CP bug, it's an issue with postgresql-jdbc, which (the version in EL7) is not compatible with PostgreSQL 9.6:


#6 Updated by Justin Sherrill over 4 years ago

  • Legacy Backlogs Release (now unused) set to 166
  • Status changed from New to Rejected

since this is a RHEL bug, closing!

#7 Updated by Hart Mel over 4 years ago

As a workaround, you can install postgresql yum repository and postgresql-jdbc package from this repository.

Also available in: Atom PDF