How do I change the maintenance database for Postgres?

gsiener picture gsiener · Apr 17, 2011 · Viewed 15.8k times · Source

I'm running PostgreSQL version 9.0 on OSX version 10.6.6. Somehow one of my development databases has become the maintenance db, not postgres (this db also exists). I can't find any documentation on how to change/set the maintenance db back to postgres.

I can't drop my development database because of this issue...

Answer

Răzvan Flavius Panda picture Răzvan Flavius Panda · Apr 6, 2013

You can change maintenance db from pgAdmin but you have to be disconnected from the database engine to be able to do that.

First disconnect:

Then in the database server properties:

Choose the desired maintenance database: