I am running the latest version of discourse on a k8s cluster and upon startup and I keep getting this error:
ERROR: relation "translation_overrides" does not exist at character 454
STATEMENT: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
WHERE a.attrelid = '"translation_overrides"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
I am guessing it has something to do with the initial setup and db migration, but I am wondering if anyone here might know why exactly this keeps happening.
Local setup is run with minikube and error logs are pulled from pgsql pod.
Discourse image used → bitnami/discourse:latest (https://github.com/bitnami/bitnami-docker-discourse)
Postgres image → postgres:11.9
Hi all, we have been investigating this issue in Bitnami setups and we traced it back to the Discourse source code, as we could also reproduce it in the vanilla Discourse launcher using the official standalone.yml template:
$ ./launcher rebuild app
...
I, [2021-05-27T10:53:27.612150 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake plugin:pull_compatible_all'
I, [2021-05-27T10:53:30.072954 #1] INFO -- : docker_manager is already at latest compatible version
I, [2021-05-27T10:53:30.073194 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
2021-05-27 10:53:32.977 UTC [4354] discourse@discourse ERROR: relation "translation_overrides" does not exist at character 454
2021-05-27 10:53:32.977 UTC [4354] discourse@discourse STATEMENT: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
WHERE a.attrelid = '"translation_overrides"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
Warning: no type cast defined for type "name" with oid 19. Please cast this type explicitly to TEXT to be safe for future changes.
> Seeding theme and color schemes
I, [2021-05-27T10:53:49.976589 #1] INFO -- : == 20000225050318 AddSchemaMigrationDetails: migrating ========================
...
Juste pour information, j’ai obtenu ceci aujourd’hui lors d’une installation fraîche (ARM), en tant qu’installation standard, mais bien qu’il indique qu’il s’agit d’une ERREUR, cela ne semble pas avoir arrêté l’installation.
I, [2025-02-24T17:48:39.792821 #1] INFO -- : cd /var/www/discourse & su discourse -c 'bundle exec rake db:migrate'
2025-02-24 17:48:43.887 UTC [389] discourse@discourse ERREUR : la relation « translation_overrides » n'existe pas à la position 523
2025-02-24 17:48:43.887 UTC [389] discourse@discourse INSTRUCTION : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment,
attidentity AS identity,
attgenerated as attgenerated
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
WHERE a.attrelid = '"translation_overrides"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
> Initialisation des thèmes et des schémas de couleurs
I, [2025-02-24T17:49:11.765841 #1] INFO -- : == 20000225050318 AddSchemaMigrationDetails: migration en cours ========
Je ne sais pas si cela a un sens. Mais j’ai eu une erreur similaire lorsque j’installais Discourse dans k8s en utilisant le chart Bitnami, et elle a disparu lorsque j’ai allongé le mot de passe postgres. Cela pourrait cependant être une coïncidence.