Hi
Shweta,
Welcome to Microsoft Q&A forum.
As I understand, you want to migrate Heroku PostgreSQL to Azure Database for PostgreSQL.
Please refer to the below documentations if helpful for you:
https://dev.to/lardcanoe/migrate-from-heroku-to-azure-1c9g
You may also raise question over Heroku team: https://help.heroku.com/ for more details about the feasibility.
Let us know if further queries.
Thanks