Re: Taking databases offline

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mariusz Czu ada" <manieq(at)idea(dot)net(dot)pl>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Taking databases offline
Date: 2001-11-22 00:05:07
Message-ID: 26259.1006387507@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Mariusz Czuada" <manieq(at)idea(dot)net(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-11-22 00:11:08 Re: TOAST performance (was Re: [GENERAL] Delete Performance)
Previous Message Tatsuo Ishii 2001-11-21 23:36:20 Re: OCTET_LENGTH is wrong