3 ms·
Some time ago I wanted to update my self-hosted PostgreSQL containers (for stuff like Nextcloud, and Gitea) and did not find a good solution to running pg_upgra
by anpanman 4y ago
Some time ago I wanted to update my self-hosted PostgreSQL containers (for stuff like Nextcloud, and Gitea) and did not find a good solution to running pg_upgrade in such an environment.
To that end I created a little container [0] that tries to upgrade the database from one version to another.
Maybe this is useful to some of you :)
[0] https://github.com/alexandrospanagiotidis/postgres-upgrader https://github.com/alexandrospanagiotidis/postgres-upgrader
- mekster 4y agoWhat's the point of running a database in a container? There are well tested distro packages for databases which get security updates automatically and none of the weirdness of container environments. Some people need to realize using the buzzword of the moment isn't necessary where it isn't.
- Avamander 4y agoIt's easier to run multiple clusters, to do testing, development and more elaborate networking. Some people need to realize that distro packages aren't good in all use-cases.
- forbiddenlake 4y agoI wanted <feature> (now lost to the mists of time), but was on Ubuntu 18.04, which only has postgresql-10. So I installed Postgres (13 or 14, I believe) from a PPA and happily used it. When I finally went to upgrade Ubuntu, do-release-upgrade literally bailed out because Postgres was installed[1]. So my choices were: uninstall Postgres for the upgrade, or do something like containerize it. I decided I had had enough problems with non-standard repos and Ubuntu upgrades (e.g. a ton of pain with upgrades of Unifi Contoller + MongoDB + Ubuntu), and containerized it. In comparison to my upgrade to 20.04, my upgrade to 22.04 was much cleaner. If you're going to tell me I should have used VMs or some hosted services, yes, thank you, I don't have the hardware to do so at home and I didn't want to spend more money on the cloud. There are use cases for containers that have nothing to do with chasing buzzwords. [1] Not my mail, but representative: https://www.postgresql.org/message-id/28768e4f-f6f7-ad78-d0dc-169954a06156%40gisticinc.com https://www.postgresql.org/message-id/28768e4f-f6f7-ad78-d0d...
- Gigachad 4y agoUnbundling OS updates from service updates is a huge benefit. No one wants to have to juggle updating the OS and migrating databases at the same time.
- Axsuul 4y agoConsistency with dev and prod and getting scheduling and management for free with Nomad. I’ve been running a 2 TB Postgres database that has an average of 2000 QPS+ in a container for many years now with no issues, what kind of weirdness are you referring to?
- itsthejb 4y agoFor one thing, the isolation. I also run a “home lab”, and started off as a newbie running everything on bare metal. Quickly ran into dependency issues, and recreating the setup was painful, even if I had used something like a ansible Nowadays my setup is a very minimal server install, setup “raw” services like SSH, basic monitoring, mDNS. Then install Docker and “up” all my compose yamls, pointing to persistent directories on disk It’s easy enough that migrating from Centos Stream to Ubuntu server took 24hrs for the meat of it
- dang 4y ago> Some people need to realize using the buzzword of the moment isn't necessary where it isn't. Please edit swipes out of your HN posts. Your comment would be fine without that last sentence. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html