Search code examples
heroku-postgres

Heroku Postgres Attachments


I recently upgraded my Postgres from hobby-dev to hobby-basic to increase the number of rows I can store and follow instructions to create basic -> copy from dev -> delete the dev.

Everything works on the new database, but I am seeing on the app resources page on heroku that I have two attachments. I believe my old database was just called "DATABASE", and the new one is HEROKU_POSTGRES_PUCE... Is this just giving me two different names to access my Database, or could this cause problems? Can I delete the attachment as HEROKU_POSTGRES_PUCE since I don't ever use that name in my code to access the DB?

enter image description here


Solution

  • When you upgrade your database, Heroku will create the new one and migrate your data to the new one.

    In migration period, the new one name would be HEROKU_POSTGRES_PUCE, and the old one is still DATABASE.

    When migration done, the new one will be promoted to primary and then DATABASE will be added automatically. And your app will connect to the database via primary DATABASE name. The previous name HEROKU_POSTGRES_PUCE is still be kept. You will have 2 names referencing to the same database. The old database will be deleted.

    I believe the HEROKU_POSTGRES_PUCE name is not used. And you can clean your setting by delete it.