Update problem : Broken Forum

We’re also seeing this behaviour, also a standard Discourse install that’s been running for several years without problems.

My theory is that there’s a problem with the database migration which tries to add a Postgres extension; from the traceback during ./launcher rebuild I see

/var/www/discourse/db/migrate/20220304162250_enable_unaccent_extension.rb:5:in change’`

I wonder if this migration should follow the same format as e.g. db/migrate/20120924182000_add_hstore_extension.rb?

I, [2022-04-02T12:49:18.895537 #1] INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"' NOTICE: extension "pg_trgm" already exists, skipping I, [2022-04-02T12:49:18.984635 #1] INFO -- : CREATE EXTENSION

@RGJ do you have any advice on trying out this change?

1 Like

No, enable_extension does the same thing.

That does not surprise me - this is what almost everyone that is encountering this issue seems to have in common. Do you happen to run an (external) Postgres database that has not been updated for a while, or that has different access rights?

1 Like

Same exact problem here. Standard install, been running fine for years, now I get this same error when trying to upgrade. Not running an external database.

Hi Erick,
For unknown reason, the OP was removing PG13 and installing PG10 (cf its pastebin), you have probably a different issue, could you post your entire output, including your commands, in a reply (or on Pastebin)?

Hi,

Sorry for the late response, I haven’t had much time since last week.

Thanks to you and Steven, the problem has been fixed and I thank you for your help.

I am explaining to you what happened because in reality, there was a problem which led to others and it was not easy to resolve everything quickly.

First, the server’s version of Postgres was no longer compatible with the latest versions of the forum. I was using version 10.

We had to discover this problem and fix it. And to fix it, you had to update Postgres but the server didn’t have enough disk space for that. You need at least double the capacity of the forum because it duplicates everything. So I had to increase the disk space of the forum. Once this was all set up, the Postgres update went smoothly and so did the forum update. There were some cold sweats, especially on the reliability of the backups, but everything went well afterwards.

Here is the process to do:

1 - Edit the app.yml file and change the postgres10.template.yml line to postgres.template.yml

2 - Save changes

3 - Increase server disk space

4 - Update Postgres

5 - Update the forum

I hope this can help other people who have been in my situation.

See you soon

3 Likes

This happened to me as well! I think this probably bit everyone who had frozen their Postgres at 10.x because they didn’t previously have enough disk for the upgrade.

I was able to work through this by running

./launcher enter db

and then

su postgres -c 'psql discourse -c "create extension if not exists unaccent;"'

I could not run “enter app” because the app was broken.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.