From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Mariusz Czu ada <manieq(at)idea(dot)net(dot)pl>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Taking databases offline |
Date: | 2001-11-22 00:26:38 |
Message-ID: | 200111220026.fAM0Qcn24769@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > 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.
You can shut database access with pg_hba.conf. I would edit
pg_hba.conf, shutdown postmaster to flush all pages, then start up with
database inactive. You can then re-enable access to the database later
with pg_hba.conf.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-11-22 00:37:26 | Re: TOAST performance (was Re: [GENERAL] Delete Performance) |
Previous Message | Bruce Momjian | 2001-11-22 00:25:17 | Re: TOAST performance (was Re: [GENERAL] Delete Performance) |