Alain Bourgeois <alain.bourge...@zetes.com> writes: > When the cluster was created, we did initdb /var/lib/pgsql10/data, the > storagebox was not available. > Then storagebox was delivered, we copied data folder to storagebox in > /mnt/pgdata/pgdir and changed postgresql.conf. We didn't delete existing > datafiles from /var/lib/pgsql10/data (db was empty).
Yeah, after further experimentation I saw that pg_upgrade would fail in a pretty obvious way unless the supposedly-config-only directory also contains a full set of subdirectories (base, pg_wal, etc). We could imagine removing that check for PG_VERSION. I don't think that the ensuing call of "postgres -C data_directory" would add anything meaningful to pg_upgrade's runtime. But then you'd see "Finding the real data directory" every time, indeed twice (for source and target directories). That seems like it would create more confusion than is justified. On the whole I think this is self-inflicted damage. Leaving that stuff around was just asking for confusion. regards, tom lane