Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. Oh fuck #postgres.

Oh fuck #postgres.

Scheduled Pinned Locked Moved Uncategorized
postgres
10 Posts 5 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • alex@feed.yopp.meA This user is from outside of this forum
    alex@feed.yopp.meA This user is from outside of this forum
    alex@feed.yopp.me
    wrote last edited by
    #1

    Oh fuck #postgres. In 18 they made a change in data path from /var/lib/postgresql/data to /var/lib/postgresql/<major_version>.

    They did exactly zero checks so users will shoot themselves in a leg in two ways:

    1. kinda benign: after 17 → 18 upgrade it won’t start
    2. fatal: user mounted docker volume at the old pathContainer restarts and data gone (that’s me)

    What the actual fuck. Why on earth you couldn’t do a simple fucking check that old directory exists and has data, but new directory is empty, and then start with directory with data spitting warnings that default has been changed and you need to do something about that.

    This is utter incompetence and giving exactly zero fucks about your user base

    regishaubourg@mastodon.socialR ascherbaum@mastodon.socialA db_geek@norden.socialD 3 Replies Last reply
    1
    0
    • R relay@relay.an.exchange shared this topic
    • alex@feed.yopp.meA alex@feed.yopp.me

      Oh fuck #postgres. In 18 they made a change in data path from /var/lib/postgresql/data to /var/lib/postgresql/<major_version>.

      They did exactly zero checks so users will shoot themselves in a leg in two ways:

      1. kinda benign: after 17 → 18 upgrade it won’t start
      2. fatal: user mounted docker volume at the old pathContainer restarts and data gone (that’s me)

      What the actual fuck. Why on earth you couldn’t do a simple fucking check that old directory exists and has data, but new directory is empty, and then start with directory with data spitting warnings that default has been changed and you need to do something about that.

      This is utter incompetence and giving exactly zero fucks about your user base

      regishaubourg@mastodon.socialR This user is from outside of this forum
      regishaubourg@mastodon.socialR This user is from outside of this forum
      regishaubourg@mastodon.social
      wrote last edited by
      #2

      @alex this is me migrating tonight to 18. Had to switch to a full pgdump for 12 To..

      1 Reply Last reply
      0
      • alex@feed.yopp.meA alex@feed.yopp.me

        Oh fuck #postgres. In 18 they made a change in data path from /var/lib/postgresql/data to /var/lib/postgresql/<major_version>.

        They did exactly zero checks so users will shoot themselves in a leg in two ways:

        1. kinda benign: after 17 → 18 upgrade it won’t start
        2. fatal: user mounted docker volume at the old pathContainer restarts and data gone (that’s me)

        What the actual fuck. Why on earth you couldn’t do a simple fucking check that old directory exists and has data, but new directory is empty, and then start with directory with data spitting warnings that default has been changed and you need to do something about that.

        This is utter incompetence and giving exactly zero fucks about your user base

        ascherbaum@mastodon.socialA This user is from outside of this forum
        ascherbaum@mastodon.socialA This user is from outside of this forum
        ascherbaum@mastodon.social
        wrote last edited by
        #3

        @alex What is your environment or OS?

        tomasv@fosstodon.orgT 1 Reply Last reply
        0
        • alex@feed.yopp.meA alex@feed.yopp.me

          Oh fuck #postgres. In 18 they made a change in data path from /var/lib/postgresql/data to /var/lib/postgresql/<major_version>.

          They did exactly zero checks so users will shoot themselves in a leg in two ways:

          1. kinda benign: after 17 → 18 upgrade it won’t start
          2. fatal: user mounted docker volume at the old pathContainer restarts and data gone (that’s me)

          What the actual fuck. Why on earth you couldn’t do a simple fucking check that old directory exists and has data, but new directory is empty, and then start with directory with data spitting warnings that default has been changed and you need to do something about that.

          This is utter incompetence and giving exactly zero fucks about your user base

          db_geek@norden.socialD This user is from outside of this forum
          db_geek@norden.socialD This user is from outside of this forum
          db_geek@norden.social
          wrote last edited by
          #4

          @alex I hope you know, that a dump/restore is required to migrate data from any previous PostgreSQL major release.
          https://www.postgresql.org/docs/current/upgrading.html

          Also, with PostgreSQL 18, initdb creates new databases by default with enabled data checksums.
          Based on this change, an in-place migration with pg_upgrade is only possible, when database running the old PostgreSQL version is also created with data checksums.

          tomasv@fosstodon.orgT 1 Reply Last reply
          0
          • db_geek@norden.socialD db_geek@norden.social

            @alex I hope you know, that a dump/restore is required to migrate data from any previous PostgreSQL major release.
            https://www.postgresql.org/docs/current/upgrading.html

            Also, with PostgreSQL 18, initdb creates new databases by default with enabled data checksums.
            Based on this change, an in-place migration with pg_upgrade is only possible, when database running the old PostgreSQL version is also created with data checksums.

            tomasv@fosstodon.orgT This user is from outside of this forum
            tomasv@fosstodon.orgT This user is from outside of this forum
            tomasv@fosstodon.org
            wrote last edited by
            #5

            @db_geek @alex No, dump/restore is not required. pg_upgrade exists for a long time.

            db_geek@norden.socialD 1 Reply Last reply
            0
            • ascherbaum@mastodon.socialA ascherbaum@mastodon.social

              @alex What is your environment or OS?

              tomasv@fosstodon.orgT This user is from outside of this forum
              tomasv@fosstodon.orgT This user is from outside of this forum
              tomasv@fosstodon.org
              wrote last edited by
              #6

              @ascherbaum @alex Yeah. I wonder what packages are being used?

              alex@feed.yopp.meA 1 Reply Last reply
              0
              • tomasv@fosstodon.orgT tomasv@fosstodon.org

                @db_geek @alex No, dump/restore is not required. pg_upgrade exists for a long time.

                db_geek@norden.socialD This user is from outside of this forum
                db_geek@norden.socialD This user is from outside of this forum
                db_geek@norden.social
                wrote last edited by
                #7

                @tomasv @alex Yes, I know.
                I'm not sure if many people in the self-hosting sector are truly aware of some complexity when dealing with PostgreSQL DBs.

                My main intention was the advice, that it is not possible to mount the dabase files from a previous PostgreSQL major version without a migration with a new PostgreSQL major version.

                Also using pg_upgrade is, when running PostgreSQL in a container, not so easy.
                One possible way can be to use this container image:
                https://github.com/tianon/docker-postgres-upgrade

                1 Reply Last reply
                0
                • tomasv@fosstodon.orgT tomasv@fosstodon.org

                  @ascherbaum @alex Yeah. I wonder what packages are being used?

                  alex@feed.yopp.meA This user is from outside of this forum
                  alex@feed.yopp.meA This user is from outside of this forum
                  alex@feed.yopp.me
                  wrote last edited by
                  #8

                  @tomasv @ascherbaum nothing special: dockerized environment, official docker image. I’ve deployed one of the services with pg18 but used default mount path to data. So I was unplesantly surprised to find empty database after 18.2 to 18.3 image upgrade. Old container was gc’ed because both pg and app healthchecks passed. Which is technically correct: app rolled bootstrap migration and went up in blank state and pg was indeed available. But data is gone. It was expected that there could be issues with 18, so it was first deployment with not that important data.

                  Another another lesson that observability as useful as your risk assessment. Also lesson in trust in vendors: no matter how consistent in their changes they were in past, they absolutelly will do stupid things. That on me. I could’ve paid more attention that’s also on me.

                  But doing change of this magnitude so careless and without any proper discussion of what can go wrong for downstream users is on the people who made this damn pull request merged.

                  Worst part this change is purely about aesthetics and addresses exactly zero issues: pg sill gives no shit about operational complexity of major version upgrades. While I respect people around pg, database itself is an example of software that is plan hostile to users. It’s never joy, it always different from of pain.

                  ascherbaum@mastodon.socialA 1 Reply Last reply
                  1
                  0
                  • alex@feed.yopp.meA alex@feed.yopp.me

                    @tomasv @ascherbaum nothing special: dockerized environment, official docker image. I’ve deployed one of the services with pg18 but used default mount path to data. So I was unplesantly surprised to find empty database after 18.2 to 18.3 image upgrade. Old container was gc’ed because both pg and app healthchecks passed. Which is technically correct: app rolled bootstrap migration and went up in blank state and pg was indeed available. But data is gone. It was expected that there could be issues with 18, so it was first deployment with not that important data.

                    Another another lesson that observability as useful as your risk assessment. Also lesson in trust in vendors: no matter how consistent in their changes they were in past, they absolutelly will do stupid things. That on me. I could’ve paid more attention that’s also on me.

                    But doing change of this magnitude so careless and without any proper discussion of what can go wrong for downstream users is on the people who made this damn pull request merged.

                    Worst part this change is purely about aesthetics and addresses exactly zero issues: pg sill gives no shit about operational complexity of major version upgrades. While I respect people around pg, database itself is an example of software that is plan hostile to users. It’s never joy, it always different from of pain.

                    ascherbaum@mastodon.socialA This user is from outside of this forum
                    ascherbaum@mastodon.socialA This user is from outside of this forum
                    ascherbaum@mastodon.social
                    wrote last edited by
                    #9

                    @alex @tomasv What does "official docker image" mean?

                    If you refer to this:

                    https://hub.docker.com/_/postgres

                    This is kind of the official "Docker Postgres Image", but this is not maintained by the PG project.

                    Blaming Postgres for this is the wrong audience.

                    alex@feed.yopp.meA 1 Reply Last reply
                    0
                    • ascherbaum@mastodon.socialA ascherbaum@mastodon.social

                      @alex @tomasv What does "official docker image" mean?

                      If you refer to this:

                      https://hub.docker.com/_/postgres

                      This is kind of the official "Docker Postgres Image", but this is not maintained by the PG project.

                      Blaming Postgres for this is the wrong audience.

                      alex@feed.yopp.meA This user is from outside of this forum
                      alex@feed.yopp.meA This user is from outside of this forum
                      alex@feed.yopp.me
                      wrote last edited by
                      #10

                      @ascherbaum @tomasv

                      🤦 thanks for pointing this out.

                      My apologies for pg people. I stand corrected, it's maintained by "docker community" (what the fuck "official" means then)

                      1 Reply Last reply
                      1
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups