I have to postgres 11 and 14 installed on my computer. When I run pg_upgrade to migrate the databases I get the following error:
PANIC: could not open control file "global/pg_control": Permission denied
However if I give the Window User full control of data directories of 11 and 14, then the upgrade works. Can someone help me what am I doing wrong since I am running pgupgrade from powershell started as admin.
If your upgrade is failing with Powershell runas Admin then you would need to check for permissions for Administrators Group on the folder. As you have verified that when windows account has full control, the migration works with powershell runas windows account