kuuhana
  • Communities
  • Multi-communities
  • Support Lemmy
  • Search
  • Login
  • Sign Up
Selfhosted@lemmy.worldbytalentedkiwi@sh.itjust.works
2 years

Breaking Changes to latest Element server

English

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!

12
    You must log in or register to comment.

    • Taasz/Woof@lemmy.blahaj.zoneEnglish
      2 years

      Does anyone know why postgresql is so broken when it comes to upgrades? Why it doesn’t do an in-place upgrade of the DB automatically when starting the new version?

      I’ve had enough problems with postgresql that I basically avoid anything using it unless I have no other options.

        • markstos@lemmy.worldEnglish
          2 years

          For minor version upgrades, the database remains binary compatible. Nothing to do.

          The dump/restore required during major upgrades allows format changes which enable new features and performance improvements without dragging around cruft forever to stay backwards compatible.

          For professionals running PostgreSQL clusters in production there is a way to cycle in the new server version with zero user-visible downtime.

            • Taasz/Woof@lemmy.blahaj.zoneEnglish
              2 years

              It’s just weird that it doesn’t do the dump-restore automatically when it detects data from an old version.

                • markstos@lemmy.worldEnglish
                  2 years

                  I think there is a catch-22.

                  pg_dump needs to connect to a running PostgreSQL instance.

                  But if you upgrade the binaries and try to start up, you can’t because the old data format doesn’t work. Because you can’t start up, pg_dump can’t connect.

                    • Taasz/Woof@lemmy.blahaj.zoneEnglish
                      2 years

                      Yeah they would need to make it backwards compatible.

                • Domi@lemmy.secnd.meEnglish
                  2 years

                  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.

                  • 𝕽𝖚𝖆𝖎𝖉𝖍𝖗𝖎𝖌𝖍@midwest.socialEnglish
                    2 years

                    I like PSQL far more than Maria DB, but it is the most stupid software for upgrades. It is the reason that, whenever I can’t use SQLite, I use a NoSQL DB like Mongo - any single executable NoSQL that contains the entire DB to a single directory seems to be the common factor. Sometimes you might hit an API change, but I think the number of times I’ve had a production application break because of a NoSQL DB server software upgrade is still at 0.

                      • markstos@lemmy.worldEnglish
                        2 years

                        I’ve spend more than a decade supporting both Postgres and MongoDB in production.

                        While they each have quirks, I prefer the quirks of Postgres.

                        I just spent a massive amount of time retooling code to deal with a MongoDB upgrade. The code upgrade is so complex because that’s where the schema is defined. No wonder MongoDB upgrades are easier— the database has externalized a lot of complexity that now becomes some coders problem to deal with.

                        • Taasz/Woof@lemmy.blahaj.zoneEnglish
                          2 years

                          MongoDB does have that annoying quirk where it creates several huge files even with a small amount of data in the DB itself. But at least it can be upgraded.

                          SQLite is really the only one I’ve used that doesn’t bother me in some way.

                            • 𝕽𝖚𝖆𝖎𝖉𝖍𝖗𝖎𝖌𝖍@midwest.socialEnglish
                              2 years

                              Agreed, SQLite 💗. It does have limitations when you need to scale with remote connections and concurrency; then you have to start bringing in layers, and it’s really not designed for that. For those jobs, it’s just better IMO to reach to something designed for that use case to begin with.

                        • limitedduck@awful.systemsEnglish
                          2 years

                          Fantastic, thanks for this. Any reason you didn’t go to 17?

                            • talentedkiwi@sh.itjust.worksEnglish
                              2 years

                              No particular reason. Just chose one and went with it.

                            Selfhosted@lemmy.world

                            selfhosted@lemmy.world

                            Subscribe from remote instance

                            Create post

                            Report community

                            Modlog
                            You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !selfhosted@lemmy.world

                            A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

                            Rules:

                            Detailed Rules Post

                            1. Be civil.

                            2. No spam.

                            3. Posts are to be related to self-hosting.

                            4. Don’t duplicate the full text of your blog or readme if you’re providing a link.

                            5. Submission headline should match the article title.

                            6. No trolling.

                            7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

                            8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

                            Resources:

                            • selfh.st Newsletter and index of selfhosted software and apps
                            • awesome-selfhosted software
                            • awesome-sysadmin resources
                            • Self-Hosted Podcast from Jupiter Broadcasting

                            Any issues on the community? Report it using the report flag.

                            Questions? DM the mods!

                            Visibility: Public

                            This community is visible to everyone.

                            • 340 users / Day
                            • 3.66K users / Week
                            • 6.21K users / Month
                            • 9.73K users / 6 months
                            • 6.64K posts
                            • 159K comments
                            • 1 local subscriber
                            • 64.2K subscribers
                            • UI: 1.0.0-beta.0
                            • BE: 1.0.0-alpha.20
                            • Modlog
                            • Instances
                            • Docs
                            • Code
                            • join-lemmy.org