I will be performing a postgres upgrade from 11.5 to 12.5 that will affect production environment. The first step assumes, that the most recent backup of database was taken, before upgrading - we would like to reduce time of this stage, due to performing upgrade in night hours. After unsuccessful research I would like to as if taking a backup made few hours before exact upgrade backup will reduce the time of next backup procedure?
That depends on how you take the backup.
If you use
pg_basebackup, the backup time is not influenced by how long ago the previous backup was taken.
If you backup with
pg_basebackup or another online file system backup technique, you don't need a new backup. Just use the previous one and the WAL archives, and you can restore any point in time in the life of the database.