Sto eseguendo l’ultima versione di Discourse su un cluster Kubernetes e all’avvio continuo a ricevere questo errore:
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
Immagino che abbia a che fare con la configurazione iniziale e la migrazione del database, ma mi chiedo se qualcuno qui sappia esattamente perché questo continua a succedere.
La configurazione locale viene eseguita con minikube e i log degli errori sono estratti dal pod pgsql.
Immagine di Discourse utilizzata → bitnami/discourse:latest (https://github.com/bitnami/bitnami-docker-discourse)
Immagine di Postgres → postgres:11.9
In questo caso, penso che tu debba chiedere loro direttamente; probabilmente non troverai una soluzione qui, dato che stai utilizzando un’installazione non supportata.
In alternativa, puoi cambiare la tua installazione con una ufficiale (anche se non so se è possibile eseguire l’installazione ufficiale in un cluster k8s).
Ciao a tutti, abbiamo indagato su questo problema negli ambienti Bitnami e lo abbiamo ricondotto al codice sorgente di Discourse, poiché siamo riusciti a riprodurlo anche nel launcher Discourse vanilla utilizzando il modello standalone.yml ufficiale:
$ ./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 è già alla versione compatibile più recente
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: la relazione "translation_overrides" non esiste al carattere 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.
> Inizializzazione del tema e degli schemi di colore
I, [2021-05-27T10:53:49.976589 #1] INFO -- : == 20000225050318 AddSchemaMigrationDetails: in migrazione ========================
...
Solo per informazione, l’ho ricevuto oggi su un’installazione fresca (ARM), come installazione standard, ma anche se dice che è un ERRORE, non sembra aver interrotto l’installazione.
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 ERROR: relation "translation_overrides" does not exist at character 523
2025-02-24 17:48:43.887 UTC [389] 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,
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
> Seeding theme and color schemes
I, [2025-02-24T17:49:11.765841 #1] INFO -- : == 20000225050318 AddSchemaMigrationDetails: migrating ========
Non so se abbia senso. Ma ho riscontrato un errore simile quando stavo configurando discourse in k8s usando il chart bitnami, e per me è scomparso quando ho reso più lunga la password di postgres. Potrebbe essere una coincidenza, però.