Re: ALTER DATABASE RENAME with HS/SR

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ALTER DATABASE RENAME with HS/SR
Дата
Msg-id 5120.1286217732@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ALTER DATABASE RENAME with HS/SR  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: ALTER DATABASE RENAME with HS/SR  (Robert Haas <robertmhaas@gmail.com>)
Re: ALTER DATABASE RENAME with HS/SR  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> 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.

I think that modern backends might survive that okay (though they didn't
use to; we once had global variable(s) containing the DB name).  But
it's much less clear that clients would cope sanely.  "I'm connected to
database foo".  "No you're not".  Connection poolers in particular are
likely to get bent out of shape by this.

OTOH, we don't have a similar interlock to prevent renaming users
who have active sessions, so maybe we are being overprotective here.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dan Ports
Дата:
Сообщение: Re: MIT benchmarks pgsql multicore (up to 48)performance
Следующее
От: Joseph Adams
Дата:
Сообщение: Re: Basic JSON support