[ACCEPTED]-How do I change the maintenance database for Postgres?-pgadmin

Accepted answer
Score: 24

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

First disconnect:

Then 2 in the database server properties:

Choose 1 the desired maintenance database:

Score: 10

You're not entirely clear on this, but do 4 you mean the "Maintenance DB" selection 3 in pgAdmin III?

Select the server in your 2 "object browser" pane; right click -> Properties

The 1 fifth field is "Maintenance DB"

Score: 3

enter image description here

Maintenance db field is read-only , you 4 can't change it.So you should keep your 3 server properties somewhere and create new 2 server with these properties and set maintenance 1 db "postgres". Now you are able to drop database.

Score: 3

The command line option is :

psql -U intelison -c "UPDATE pg_database SET datistemplate=false, datallowconn=true WHERE datname = '<your_database_name>'"


More Related questions