I found difficulty when I wanna move data folder of PostgreSQL. After googling stackoverflow, I try my own way:
1. Backup data folder.
2. Uninstall PostgreSQL and Re-Install PostgreSQL. Remember to use the same installer version.
I move folder installation from C to E.
3. Stop service.
4. Copy content of data backup folder and paste to folder data new installed. All the folder excep *.conf, *.pid, *.opts.
5. Start service.
The theory is this won’t work if you try to upgrade from older PostgreSQL version. Use pg_upgrade instead.