pg_upgrade from Postgres 9.5.5 to Postgres 12.3 errors out I am trying to upgrade the database cluster from 9.5.5 to 12.3 using pg_upgrade.
I ran it with the --check option, and the result came back &quot;clusters compatible&quot;, but when I run it with the --clone option, I get the error below. The log does not tell me where it’s failing.
relname: pg_catalog.pg_largeobject: reloid: 2613 reltblspace: 
relname: pg_catalog.pg_largeobject_loid_pn_index: reloid: 2683 reltblspace: 
executing: SELECT pg_catalog.set_config(‘search_path’, ‘’, false);
Checking for presence of required libraries         ok
could not clone file between old and new data directories: Operation not supported
The documentation says:

File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the pg_upgrade run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS.

Obviously you are using different software.
You could use the --link option for a fast upgrade, but that will make the old cluster unusable after the upgrade.
Don't upgrade to 12.3. Use the latest supported minor release, currently 12.5.