PostgreSQL uninstall on Windows
问题 In the process of upgrading from PostgreSQL 11 to 12 on Windows, I uninstall PG-11 using the uninstall.exe, wait for like 15 seconds (to make sure that the uninstall.exe is complete), delete the bindir (if exists) and then install the Postgres-12.exe. This all is done in a batch file and the code looks something like: uninstall-postgresql.exe --mode unattended PING 1.1.1.1 -n 15 >NUL if exist C:\PostgreSQL\bindir RD /Q /S C:\PostgreSQL\bindir postgresql-12.1.exe --servicename Postgres -