ERROR: could not find hash function for hash operator 607 on upgrading to Postgres 11

Hi there,

we’re getting an error on upgrading to Postgres 11 with

gitlab-ctl pg-upgrade

Error message is:

SQL command failed
WITH regular_heap (reloid, indtable, toastheap) AS ( SELECT c.oid, 0::oid, 0::oid FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON c.relnamespace = n.oid WHERE relkind IN (‘r’, ‘m’) AND ((n.nspname !~ ‘^pg_temp_’ AND n.nspname !~ ‘^pg_toast_temp_’ AND n.nspname NOT IN (‘pg_catalog’, ‘information_schema’, ‘binary_upgrade’, ‘pg_toast’) AND c.oid >= 16384::pg_catalog.oid) OR (n.nspname = ‘pg_catalog’ AND relname IN (‘pg_largeobject’, ‘pg_largeobject_metadata’) ))), toast_heap (reloid, indtable, toastheap) AS ( SELECT c.reltoastrelid, 0::oid, c.oid FROM regular_heap JOIN pg_catalog.pg_class c ON regular_heap.reloid = c.oid WHERE c.reltoastrelid != 0), all_index (reloid, indtable, toastheap) AS ( SELECT indexrelid, indrelid, 0::oid FROM pg_catalog.pg_index WHERE indisvalid AND indisready AND indrelid IN (SELECT reloid FROM regular_heap UNION ALL SELECT reloid FROM toast_heap)) SELECT all_rels.*, n.nspname, c.relname, c.relfilenode, c.reltablespace, pg_catalog.pg_tablespace_location(t.oid) AS spclocation FROM (SELECT * FROM regular_heap UNION ALL SELECT * FROM toast_heap UNION ALL SELECT * FROM all_index) all_rels JOIN pg_catalog.pg_class c ON all_rels.reloid = c.oid JOIN pg_catalog.pg_namespacen ON c.relnamespace = n.oid LEFT OUTER JOIN pg_catalog.pg_tablespace t ON c.reltablespace = t.oid ORDER BY 1;
ERROR: could not find hash function for hash operator 607

Hi @HHGAG, welcome to the GitLab Community forum!

Can you help us troubleshoot by sharing some additional details?

  • What version of GitLab are you running?
  • If you look at yourgitlaburl.com/admin, what version of PostgreSQL is displayed under “Components”?
  • Are you using the Omnibus-included PostgreSQL database?
  • When was the last time you ran gitlab-ctl reconfigure?
  • Do you see any warnings or errors indicated in the output of sudo gitlab-rake gitlab:check SANITIZE=true?

Thanks!

Hi Greg,

thnx for quick reply.

What version of GitLab are you running?

12.10.14-ce.0

If you look at yourgitlaburl.com/admin , what version of PostgreSQL is displayed under “Components”?

PostgreSQL10.12

Are you using the Omnibus-included PostgreSQL database?

Included

When was the last time you ran gitlab-ctl reconfigure ?

Today

  • Do you see any warnings or errors indicated in the output of sudo gitlab-rake gitlab:check SANITIZE=true ?

Everything is fine

We can’t update to 13.0.14, while PostgreSQL 11 is needed and fails on upgrade.