I have a production database that I'm told is "named incorrectly". Is there a way to change the name without interruption?
The database in question is named something like
prod_api_db and should be named
I was hoping there would be a way to create an "alias" so to speak, such that both names are valid and point to the same database for a time period while all of the app configurations are updated with the new name. Once everything's updated, the old name could be removed.
-- Stage 1, create alias "api_db": apps ==> prod_api_db > actual_database api_db -- Stage 2, Update app configs: prod_api_db > actual_database apps ==> api_db -- Stage 3, Remove old name: apps ==> api_db > actual_database
Does that sort of functionality exist in postgres?
Just for background, this is postgres 11. I do have dev, qa, and production servers to work with, so I can test before apply a change.
Pardon me if I'm being very ignorant about this. I'm not a DBA... just an SRE working for a small company who's been given charge of some database, and I haven't found a good answer yet.