• MangoPenguin@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    edit-2
    5 months ago

    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.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      5 months ago

      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.

        • markstos@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          5 months ago

          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.