Error when restore DB backup

Hmm what do you think @tgxworld?

Hmm OK this is tricky but I have a temporary fix out for this.

https://github.com/discourse/discourse/commit/6740631fdb379f764e8d3007447341f4496dc350

The problem here is that the Discourse restorer only migrates table to the backup schema and not functions that we create. The fix here is to ensure that the restorer migrates functions created by the Discourse code base as well but I’ll need to work on a pattern to identify “Discourse PostgreSQL functions”. I’ll probably just namespace the functions that we create with _discourse_.

3 Likes

So, is it enough a to run a ./launcher rebuild app and then to try to import again the backup?

Yes that will fix it

2 Likes

it seems to be working. Thanks

2 Likes

Turns out it was much easier to create the functions in a dedicated schema which we do not backup.

7 Likes

This topic was automatically closed after 4 days. New replies are no longer allowed.