could kubegres made upgrade major posgresql version without downtime?
Hello guys, thanks for your great work ;) kubegres look like simple operator which cover most of my use cases, but could kubegres made upgrade major posgresql version without downtime?
will you run pg_upgrade if I will change PostgreSQL image in custom resource to v14?
Thank you so much for your kind feedback. Excellent suggestion. I am going to add it in our backlog now.
Currently, Kubegres allows upgrading the versions of a Postgres container without any specific logics meaning it deleguates that to postgres container .
As a general behaviour, Kubegres applies a spec change first to a Replica Postgres instance. If that fails, Kubegres doesn't apply the spec change to other Replica and Primary instances. Consequently, Kubegres protects the Primary instance as much as possible.
Postgresql guarantees compatibilities between minor versions upgrade (e.g. 13.1 to 13.3) and consequently it's working fine with Kubegres.
However, as you rightly suggested, if there is an attempt to upgrade a Postgres container with a major version (e.g. from version 12 to 13), PostgreSql will display an error about DB incompatibility for the Replica instance.
Saying that, if once upgrading to major version, we access to Replica pod and manually and run "pg_upgrade", it should work. But in term of user experience, it isn't great.
We will add a logic to run the "pg_upgrade" command if the version change is major, as you mentioned.
I am going to use this ticket as a feature enhancement.
Thank you!