Re: LOCK DATABASE - Mailing list pgsql-hackers

From Tom Lane
Subject Re: LOCK DATABASE
Date
Msg-id 23349.1305826453@sss.pgh.pa.us
Whole thread Raw
In response to Re: LOCK DATABASE  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: LOCK DATABASE  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Excerpts from Robert Haas's message of jue may 19 10:18:20 -0400 2011:
>> Second, it relies on the fact that a new connection briefly grabs a
>> lock on the database that is then released.

> Yes.  This is well known and it's not going away.

>> If we happened (for whatever reason) to want to change that to a
>> session lock, or get rid of it entirely, then this would break.

> That would break other things too, so I don't see it as a problem.

I can't see getting rid of that lock, since we'd simply have to invent
some other interlock for new connections vs. DROP DATABASE.  However,
I do think that we might sometime need to convert it to a session lock
that's held for the life of the backend.  If this feature can't cope
with that, that'd be a potential problem.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: LOCK DATABASE
Next
From: Alvaro Herrera
Date:
Subject: some config options do not have defaults documented