Neat :) I personally feel like upgrading a database should be an explicit admin process, and isn't something I want my db container entrypoint automagically handling.
A PostgreSQL Docker container that automatically upgrades your database
51–60 of 93 posts
Re: A PostgreSQL Docker container that automatically upgrades your database
#52Neat :) I personally feel like upgrading a database should be an explicit admin process, and isn't something I want my db container entrypoint automagically handling.
Yeah, a lot of the time I'd agree with you. :) This container came about for the Redash project ( https://github.com/getredash/redash ), which had been stuck on PostgreSQL 9.5 (!) for years. Moving to a newer PostgreSQL version is easy enough for new installations, but deploying that kind of change to an existing userbase isn't so pretty. For people familiar with the command line, PostgreSQL, and Docker then its no b…
I agree it should be explicitly invoked and not automated, for something almost everyone needs to do, it sure is a hard task.
Re: A PostgreSQL Docker container that automatically upgrades your database
#53Earlier quoted context omitted.
Right, but you’re not actually automatically migrating a Postgres 13 program to Postgres 15 in a running container. That was what I first thought when I read the title. You’re using the work “upgrade” differently than how I normally think about it when talking about version changes. You’re talking about data-on-disk, not just the program version. (I realize that when talking about Postgres, the two are linked, but th…
Is there better wording that's concise? I'm just going with what I thought of, but am happy to adjust things as makes sense. :)
Still uses "upgrade", but highlights the fact that you're changing the artifact and not just the software.
Re: A PostgreSQL Docker container that automatically upgrades your database
#54In a small startup...
* If the data is mission-critical and constantly changing, PostgreSQL is a rare infra thing for which I'd use a managed service like AWS RDS, rather just Debian Stable EC2 or my own containers. The first time I used RDS, the company couldn't afford to lose an hour of data (could destroy confidence in enterprise customer's pilot project), and without RDS, I didn't have time/resources to be nine-9s confident that we could do PITR if we ever needed to.
* If the data is less-critical or permits easy sufficient backups, and I don't mind a 0-2 year-old stable version of PG, I'd probably just use whatever PG version Debian Stable has locked in. And just hold my breath during Debian security updates to that version.
(Although I think I saw AWS has a cheaper entry level of pricing for RDS now, which I'll have to look into next time I have a concrete need. AWS pricing varies from no-brainers to lunacy, depending on specifics, and specifics can be tweaked with costs in mind.)
Re: A PostgreSQL Docker container that automatically upgrades your database
#55Re: A PostgreSQL Docker container that automatically upgrades your database
#56Earlier quoted context omitted.
Are people putting their databases in K8s now? I thought the old rule of thumb was don't do that but perhaps it has changed. Feels like the database would take a massive performance hit using network backed storage unless the software is aware of that fact.
If you're running in the cloud, say on AWS EKS, it makes sense to use in-cluster databases for development environments, and only use RDS DB's for production/integration to save on hosting costs.
Re: A PostgreSQL Docker container that automatically upgrades your database
#57Neat :) I personally feel like upgrading a database should be an explicit admin process, and isn't something I want my db container entrypoint automagically handling.
Re: A PostgreSQL Docker container that automatically upgrades your database
#58> It's whole purpose in life is to automatically detect the version of PostgreSQL used in the existing PostgreSQL data directory, and automatically upgrade it (if needed) to the latest version of PostgreSQL. In a small startup... * If the data is mission-critical and constantly changing, PostgreSQL is a rare infra thing for which I'd use a managed service like AWS RDS, rather just Debian Stable EC2 or my own containe…
Re: A PostgreSQL Docker container that automatically upgrades your database
#59the closest thing to this is helm which like everything in the k8s ecosystem is either a useful tool or a single feature wrapped in a cursed configuration language, depending on your perspective
not hard to imagine a single command to snapshot the volume, boot the new version, run a migration command, revert if something fails
Re: A PostgreSQL Docker container that automatically upgrades your database
#60> It's whole purpose in life is to automatically detect the version of PostgreSQL used in the existing PostgreSQL data directory, and automatically upgrade it (if needed) to the latest version of PostgreSQL. In a small startup... * If the data is mission-critical and constantly changing, PostgreSQL is a rare infra thing for which I'd use a managed service like AWS RDS, rather just Debian Stable EC2 or my own containe…