Re: lock a database from new connections, without modifying pg_hba.conf

From: adey <adey11(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, pgsql-admin(at)postgresql(dot)org
Subject: Re: lock a database from new connections, without modifying pg_hba.conf
Date: 2006-07-10 22:58:40
Message-ID: 1c66bda80607101558x51dd4eb5l5fb569ea31f00da6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Can hba be manipulated in such a way to make Postgres "read only" to obtain
a complete and full backup please, and if so, how?

On 5/19/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> "Marc G. Fournier" <scrappy(at)postgresql(dot)org> writes:
> > Is that possible? I've checked the docs for 8.1, and am not finding
> > anything, nor anything in contrib ...
>
> > the best I've been able to think of so far is to modify pg_hba.conf to
> not
> > allow new connections for the duration of the operations I need to
> perform
> > (drop and create a database) ...
>
> Not sure I understand what you need. DROP DATABASE already locks out
> new connections.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Joshua D. Drake 2006-07-10 23:26:54 Re: lock a database from new connections, without modifying pg_hba.conf
Previous Message Lane Van Ingen 2006-07-10 22:05:31 Performance Slowly Decreasing As Database Grows