close database, nomount state

Started by Nonamealmost 18 years ago4 messagesgeneral
Jump to latest
#1Noname
postgre@seznam.cz

Hello,
I want to ask if there is something like nomount state or close database state
in which I can acces postgresql to drop database or to do some other stuff.

Because when there are some connections, drop database is not
possible. Or is this done some other way?

Lukas Houf

#2Vick Khera
vivek@khera.org
In reply to: Noname (#1)
Re: close database, nomount state

On Apr 28, 2008, at 6:50 PM, postgre@seznam.cz wrote:

I want to ask if there is something like nomount state or close
database state
in which I can acces postgresql to drop database or to do some other
stuff.

change the permissions on the DB so nobody can log in. you really
should find all applications that are trying to login and shut them
down, else they'll start spewing errors once you delete the DB.

#3paul rivers
privers@berkeley.edu
In reply to: Noname (#1)
Re: close database, nomount state

postgre@seznam.cz wrote:

Hello,
I want to ask if there is something like nomount state or close database state
in which I can acces postgresql to drop database or to do some other stuff.

Because when there are some connections, drop database is not
possible. Or is this done some other way?

Lukas Houf

Short answer-- no.

Longer answer-- there's really no need for the Oracle-esque nomount
state in Pg. If you're doing media recovery, it's very much all or
nothing, cluster-wide. You are not going to do media recovery for a set
of tablespaces, for example. If you'd like to drop a database, you can
cut off connections (say, via pg_hba.conf or whatever floats your boat)
and drop it with a single command. It's not such a big deal as it is in
Oracle.

If this doesn't answer your question, could you say more about what your
issue is?

Regards,
Paul

#4Noname
postgre@seznam.cz
In reply to: paul rivers (#3)
Re: [GENERAL] close database, nomount state

paul rivers <privers@berkeley.edu> wrote:

Short answer-- no.

Longer answer-- there's really no need for the Oracle-esque nomount
state in Pg. If you're doing media recovery, it's very much all or
nothing, cluster-wide. You are not going to do media recovery for a set
of tablespaces, for example. If you'd like to drop a database, you can
cut off connections (say, via pg_hba.conf or whatever floats your boat)
and drop it with a single command. It's not such a big deal as it is in
Oracle.

If this doesn't answer your question, could you say more about what your
issue is?

Regards,
Paul

Thanks for your response,
that was exactly what I wanted to know. I was thinking about
pg_hba.conf but I was hoping there is some more elegant way
to do that :-)

Regards,
Lukas Houf