On Mon, Oct 4, 2010 at 3:16 PM, Josh Berkus <j...@agliodbs.com> wrote:
> On 10/4/10 10:24 AM, Robert Haas wrote:
>> I understand that we need to disconnect users if the database is
>> dropped (it's kind of hard to access a database that's not there any
>> more...) but I'm fuzzy on why we'd need to do that if it is merely
>> renamed.
>
> This seems like an unexpected benefit, and the behavior which users
> would desire if they could choose it.  Why would we break what's not broken?
>
> +1 to keep ALTER DATABASE functionality the way it is, and merely fix
> the docs.

Well, the current behavior isn't too consistent.  If you try to rename
a database then:

(1) If there's a connection to that database on the primary, it blocks
for a bit and then gives up, complaining of clients connected to that
database.
-but-
(2) If there's a connection to that database on the secondary, it
obviously doesn't block and recovery isn't blocked either.  It just
replays the record and, boom, you're connected to the new database,
except you don't know it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to