An unofficial, read-only Hacker News reader.

What Changes When You Upgrade from PostgreSQL 18 to 19 (opens external site)

107 points by rgoomar 2 days ago | rishigoomar.com | 30 comments on HN

View full thread · View on Hacker News

Comment thread (14)

  1. I can always tell when a new postgres comes out because one of my docker powered apps just breaks (just a selfhosted one, nothing actually important). The official docker for postgres attempts to do no auto update between versions and you're basically left to go figure it out yourself when `latest` breaks itself. This is by design, apparently.

    I know there's an argument for version pinning, but I don't want to have to handhold random docker containers. It should be automated IMO. It's become a deterrent for me wanting to deploy anything that depends on postgres.

    Replies (5)
    1. There is no universe where a database auto- updating across major versions is a sane default. If you want a "postgres-yolo" container, you could build it on top of the upstream image and use cron/github action/etc to automate rebuilds.
      Replies (3)
      1. Supporting people who think "postgres-yolo" should be a thing would be a masochistic self-own. Perpetual backwards compatibility is not a reasonable addition to all the other constraints that database development must satisfy.
        Replies (1)
        1. > Perpetual backwards compatibility is not a reasonable addition to all the other constraints that database development must satisfy.

          sqlite3 has been backwards compatible since its release in 2004.

          Replies (1)
          1. That's comparing apples and oranges. Only a vanishingly small number of SQLite instances are administered by DBAs, therefore the file format has to remain stable. Also, Sqlite3 has no ambition to introduce a massive number of new features, to scale to the skys (though it is surprisingly good in that regard), and prioritizes stability and simplicity.
      2. Let’s call it fake SMR as a service.
      3. PostgreSQL (over the wire) is backwards compatible for at least a few versions, so it should be "pretty safe" for a lot (most?) situations.
        Replies (1)
        1. The file format is not safe. Thus the major version.
    2. I'm in same boat. I love Postgres but honestly it's backward incompatability is a non starter for self-hosting.
      Replies (1)
      1. You don’t have to upgrade to a new major version when it comes out, you know?

        Postgres 18 will still get bug fixes and security updates for 4 more years.

    3. Semver in practice is "a land of contrasts", but when exactly is 'latest' the best possible idea for production postgres?

      At that point also go with "ext4" 'latest'. Bonus points for it silently going to ext5 in future.

    4. If you want to YOLO the latest version with automatic upgrade, consider using [1] instead of the default postgres:latest image

      [1]: https://hub.docker.com/r/pgautoupgrade/pgautoupgrade

      Replies (1)
      1. Needs an option that pre-compresses to zero Bytes on rainy Tuesday's in timezones with a something-and-a-half hours offset from UTC during DST and a race condition in a chron job.
    5. Being on 'latest' instead of a fixed version (at least the major number) is crazy but I agree that the official image not being able to upgrade the data is very inconvenient.

      Allowing auto-updating through an env var or something would be appreciated.