1.Stop the new postgressql service and start old postgresql service
2.Use cmd to open the old postgresql bin directory
"D:\medavis\postgresql94\pgsql\bin> pg_dumpall -U postgres > back_file"
the back_file include all database of PG_SQL
back_file is created at directory:D:\medavis\postgresql94\pgsql\bin
3.copy "back_file" to the new database directory:"D:\medavis\medavis-postgresql-dist-1.0.0.1\pgsql\bin"
4.Stop the old postgresql service and start new postgresql service
5.Use cmd to open the new postgresql bin directory
D:\medavis\medavis-postgresql-dist-1.0.0.1\pgsql\bin>psql -U postgres < back_file
all database are migrated successfully to the new postgresql server.