For those that run Element server and run postgresql version older than 13 will need to update their postgresql major version.
I found these instructions by ‘maxkratz’ on their github page which worked perfectly for me to go from 11 to 16.
Hopefully this helps someone!
That’s the thing I don’t like about Postgres either. The performance is significantly better than with MariaDB but Postgres is such a pain for non-enterprise use.
Same with crash recovery, Postgres just can’t recover if the WAL is corrupted. MariaDB will happily fix itself but Postgres will just sit there and wait until somebody babysits it.
So you better spin up a second Postgres container, run
pg_resetwal
, restart the database and terminate any open transactions manually with a 2 page query you hopefully wrote down. Might reindex all tables as well to be sure.I have a separate “postgres unfuck” script by now.