Skip site navigation (1) Skip section navigation (2)

Re: ALTER DATABASE and datallowconn

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER DATABASE and datallowconn
Date: 2012-05-03 14:28:26
Message-ID: CABUevEzwdKFOqYrhvZNsWo5TjbAxYDpoUUcN95_eMeUVfB3jfw@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Thu, May 3, 2012 at 4:26 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>> On Thu, May 3, 2012 at 4:13 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>>>> Is there a particular reason we don't have an ALTER DATABASE switch
>>>> that controls the datallowconn, or is it just something "missed out"?
>
>>> It was never intended to be a user-accessible switch, just something to
>>> protect template0.
>
>> It can be rather useful for others as well, though - since it works as
>> a defense against superusers doing the wrong thing..
>
> I'm having a hard time seeing the use-case for a user-created database
> that nobody at all can connect to.  Even if there is some marginal use

template databases.

> for that, you could achieve the result with a special entry in
> pg_hba.conf to "reject" all connection attempts for that DB.

Yeah, that would work.

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2012-05-03 14:33:12
Subject: Re: How hard would it be to support LIKE in return declaration of generic record function calls ?
Previous:From: Tom LaneDate: 2012-05-03 14:26:34
Subject: Re: ALTER DATABASE and datallowconn

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group