Skip to content

ActiveRecord::StatementInvalid: PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of...

This started happening on dev quite often today.

https://sentry.gitlap.com/gitlab/devgitlaborg/issues/205386/

PG::UndefinedFunction: ERROR:  function lower(integer) does not exist
LINE 1: ...s"."type" IN ('Group') AND ((LOWER(routes.path) = LOWER(1)))...
                                                             ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

  peek/views/pg.rb:17:in `async_exec'
    super(*args)
  peek/views/pg.rb:17:in `async_exec'
    super(*args)
  active_record/connection_adapters/postgresql_adapter.rb:592:in `block in exec_no_cache'
    log(sql, name, binds) { @connection.async_exec(sql, []) }
  active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'
    :binds          => binds) { yield }
  active_support/notifications/instrumenter.rb:20:in `instrument'
    yield payload
...
(214 additional frame(s) were not displayed)

ActiveRecord::StatementInvalid: PG::UndefinedFunction: ERROR:  function lower(integer) does not exist
LINE 1: ...s"."type" IN ('Group') AND ((LOWER(routes.path) = LOWER(1)))...
                                                             ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
: SELECT  "namespaces".* FROM "namespaces" INNER JOIN "routes" ON "routes"."source_id" = "namespaces"."id" AND "routes"."source_type" = 'Namespace' WHERE "namespaces"."type" IN ('Group') AND ((LOWER(routes.path) = LOWER(1)))  ORDER BY (CASE WHEN  routes.path = 1 THEN 0 ELSE 1 END) LIMIT 1
PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block

  peek/views/pg.rb:17:in `async_exec'
    super(*args)
  peek/views/pg.rb:17:in `async_exec'
    super(*args)
  active_record/connection_adapters/postgresql_adapter.rb:592:in `block in exec_no_cache'
    log(sql, name, binds) { @connection.async_exec(sql, []) }
  active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'
    :binds          => binds) { yield }
  active_support/notifications/instrumenter.rb:20:in `instrument'
    yield payload
...
(201 additional frame(s) were not displayed)

ActiveRecord::StatementInvalid: PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
: SELECT  "application_settings".* FROM "application_settings"  ORDER BY "application_settings"."id" DESC LIMIT 1

PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
: SELECT  "application_settings".* FROM "application_settings"  ORDER BY "application_settings"."id" DESC LIMIT 1