Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
postgresql_upgrade_majort_version [2020/01/20 16:08] andonovjpostgresql_upgrade_majort_version [2020/01/26 17:06] (current) – external edit 127.0.0.1
Line 223: Line 223:
   * Using logical replication to minimize the downtime to almost 0.   * Using logical replication to minimize the downtime to almost 0.
  
 +
 +We have two environments:
 +
 +PostgreSQL 9.1 on Linux 5, which should be migrated to:
 +PostgreSQL 10 on Linux 7
 +
 +To migrate from such an old version there are two options
 +
 +
 +  - Upgrade the current version to 10 and simply migrate the data using backup/restore
 +  -  Backup the current version 9.1 using (pg_dumpall and pg_dump) and restore it (pg_restore) to the new version 10
 +
 +Since the first path will take waaay longer and since we are lazy AF, we will be using the second path
 +
 +
 +=====Backup=====
 +In order to backup the data in universal format we have to:
 +
 +  - Dump the globals: Roles & Tablespaces using pg_dumpall
 +  - Dump each database (we will use the custom format "-Fc" since it is more flexible) using pg_dump -Fc
 +
 +So let's get going:
 +
 +===Dump Globals===
 +<sxh bash>
 +
 +
 +
 +</sxh>
  
  • postgresql_upgrade_majort_version.1579536492.txt.gz
  • Last modified: 2020/01/21 00:08
  • (external edit)