by harshal · 10y ago · 0 comments
> 2ndQuadrant is working on highly efficient upgrades from earlier major releases, starting with 9.1 → 9.5/9.6.
I hadn't heard of that before. Anybody know more about this? I'm currently babysitting a 9.1 deployment which we desperately want to get upgraded. The amount of downtime this can tolerate a very limited and I was currently tasked with coming up with a plan. Its going to get hairy. If such a tool is really on its way, I could make a case for holding off on the upgrade for a few more months and save quite a bit of work.
Making "zero downtime" upgrades possible is part of the whole logical replication effort - both within the community and in 2ndQuadrant in particular.
Petr Jelinek actually described how to do that using UDR (uni-directional logical replication) in 2014:
https://wiki.postgresql.org/images/a/a8/Udr-pgconf.pdf
There might be a newer talk somewhere, I'm sure he spoke about it on several events.
I have updated ~2TB of database from 9.0 all the way to 9.5 over the years.
Also: You don't need to be offline to copy the data directory. Check `pg_start_backup` or `pg_basebackup` (which calls the former)
Regarding your second point, I meant copying the data directory as in a 'cp' command. Or rsync if you will. The functions you mentioned are only useful when doing a dump, isn't it? And recovering from a upgrade problem using a dump is way slower than just starting the previous version in the backup data directory.
(See also https://www.postgresql.org/docs/9.5/static/continuous-archiv...)
;)