Open lucernae opened 4 years ago
Looks good for me @lucernae .
Just a note that they are various upgrade options.
I haven't done a comparison of what the disadvantages and advantages are.
I have also used the postgis_restore.pl
to do a DB upgrade
I see, so upgrading the database doesn't necessarily upgrade postgis related objects?
I see, so upgrading the database doesn't necessarily upgrade PostGIS related objects?
If you upgrade the cluster it does everything.
https://www.postgresql.org/docs/12/upgrading.html
postgis_restore.pl uses a normal pgdump which might work well with the pg_backup containers that already produce the .dmp
. So I assume we could have two recipes.
Some update on my part.
I would like to add functionality to upgrade cluster from previous major version to current major version.
I imagine we can use a stateless container to perform the upgrade like this:
Proposed implementations
We are going to use postgresql common upgrade procedure, which is using
pg_upgradecluster
. The upgrade process is going to be wrapped in/scripts/cluster_upgrade.sh
. What the script will do:apt install
at run time)main
by doingpg_renamecluster
. This should be ok and stateless since the containers only modifies internal data.PGDATANEW
. This directory should be mounted to a volume.Output:
Extensibility: Users might want to perform some extra initialization/post upgrade steps. We provide a file hook called
/upgrade.d/pre.sh
andupgrade.d/post.sh
to put a script hook.pre.sh
will be executed before the upgrade.post.sh
will be executed after a successful upgrade. Upgrade error can be detected and handled directly from stdout logs.CC @NyakudyaA