Re: Taking database offline

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: ow <oneway_111(at)yahoo(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Taking database offline
Date: 2003-11-12 21:08:34
Message-ID: Pine.LNX.4.33.0311121407020.31933-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, 12 Nov 2003, ow wrote:

> Hi,
>
> Is there a way to take the database offline to keep users out?
> Is there a way to take the database offline but still allowing pg_restore to
> run against it?

Yes, as of 7.3 you can create entries in pg_hba.conf that control who can
connect to what database. Just make a backup of the original pg_hba.conf,
and set up your copy to have only the postgres (or other) superuser be
allowed to connect. Then, swap the two hba files and restart the server.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Bruno Wolff III 2003-11-12 21:09:45 Re: Taking database offline
Previous Message ow 2003-11-12 20:07:23 Taking database offline