works well for migrating from postgres 11 as well as deploying a fresh instance
created an entryscript that check for incorrect `PG_VERSION`. if so, it downloads the old binaries and performs an update via `pg_upgrade`
inspired by:
- https://github.com/docker-library/postgres/issues/37
- https://github.com/tianon/docker-postgres-upgrade/tree/master/11-to-15
- https://github.com/bwbroersma/docker-postgres-upgrade/blob/cf5c8609a70952f01681d7fc4e55ed676bcd5faf/upgrade/docker-upgrade-entrypoint-wrapper.sh
works well for migrating from postgres 11 as well as deploying a fresh instance
I don't know in which state the migration did not complete, its just a safety mechanism to stop interrupted migrations that are in an unclear state. With restore I mean to restore the hopefully made backup. Does this make it more clear?
I don't know in which state the migration did not complete, its just a safety mechanism to stop interrupted migrations that are in an unclear state. With restore I mean to restore the hopefully made backup. Does this make it more clear?
Is gosu definitely already installed? I guess it could be included in the apt-install stuff above to help make it more portable. Just noting this thought in case it's useful.
Is `gosu` definitely already installed? I guess it could be included in the `apt-install` stuff above to help make it more portable. Just noting this thought in case it's useful.
LGTM @iexos! Perhaps some Autonomicz have some thoughts on this as they maintain Outline stuff too /cc @3wordchant@cas@knoflook Not sure who else to ping atm, feel free to merge from my side
LGTM @iexos! Perhaps some Autonomicz have some thoughts on this as they maintain Outline stuff too /cc @3wordchant @cas @knoflook Not sure who else to ping atm, feel free to merge from my side
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
created an entryscript that check for incorrect
PG_VERSION. if so, it downloads the old binaries and performs an update viapg_upgradeinspired by:
works well for migrating from postgres 11 as well as deploying a fresh instance
Great stuff!
@@ -0,0 +5,4 @@NEWDATA=$PGDATA/new_dataif [ -e $MIGRATION_MARKER ]; thenecho "FATAL: previous migration not completed. manual restore necessary"Can we help with a from which version to which we need to handle the manual restore with?
I don't know in which state the migration did not complete, its just a safety mechanism to stop interrupted migrations that are in an unclear state. With restore I mean to restore the hopefully made backup. Does this make it more clear?
@@ -0,0 +19,4 @@postgresql-$DATA_VERSION \&& rm -rf /var/lib/apt/lists/*echo "shuffling around"gosu postgres mkdir $OLDDATA $NEWDATAIs
gosudefinitely already installed? I guess it could be included in theapt-installstuff above to help make it more portable. Just noting this thought in case it's useful.gosuis used in the vendordocker-entrypoint.sh. Its not portable to-alpine, but wouldn't be withapt-installeitherLGTM @iexos! Perhaps some Autonomicz have some thoughts on this as they maintain Outline stuff too /cc @3wordchant @cas @knoflook Not sure who else to ping atm, feel free to merge from my side
We hot tested this on our outline and it worked, modulo a tiny change without which it fails in a most alarming manner, see inline.