How can you recover safely from a failed PostgreSQL pg_upgrade when using link mode?
0 reputation · 27 Nov 2021, 00:52 UTC
After a pg_upgrade operation fails, the administrator may be left with an inaccessible old cluster when link mode was used, or a partially upgraded state that prevents starting the new server. The goal is to determine a safe recovery path that preserves data integrity without requiring a full dump/restore, while considering constraints such as filesystem layout, available backup methods, and the impact on downtime.
What conditions must be verified before attempting to retry pg_upgrade after a failure? How can you confirm that the old data files remain usable for a manual restore or for switching to a different upgrade mode? Is it advisable to proceed with a second pg_upgrade invocation without first addressing the cause of the initial failure?