Re: Taking databases offline - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Taking databases offline
Date
Msg-id 26259.1006387507@sss.pgh.pa.us
Whole thread Raw
In response to Taking databases offline  ("Mariusz Czu³ada" <manieq@idea.net.pl>)
Responses Re: Taking databases offline
List pgsql-hackers
"Mariusz Czu�ada" <manieq@idea.net.pl> writes:
> Is it possible (and safe) to move database files to other location while
> server is working?

No.  Shut down the postmaster first.

> But had to shutdown server first. So my question (and
> suggestion) is to consider:
> ALTER DATABASE <dbname> { OFFLINE [ { WAIT | IMMEDIATE }] | ONLINE };

Of course, you have this ability now on an installation-wide basis
with the available postmaster shutdown options.  It's difficult to get
excited about expending the work to make this doable on a per-database
basis, mainly because I foresee multi-database installations getting
much less popular once we implement SQL schemas.  Lots of schemas in
one (user) database per installation will become the norm, I think.
In that scenario a per-database shutdown option will be useless.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: OCTET_LENGTH is wrong
Next
From: Bruce Momjian
Date:
Subject: Re: TOAST performance (was Re: [GENERAL] Delete Performance)