Currently I want to transfer all my local database to the remote server and I found a very simple solution.
(1) Backup your database [1]
(2) Transfer the backup to the destination server.
(3) Restore the database on the server.[2]
Reference:
[1] http://www.postgresguide.com/utilities/backup-restore.html