Re: changing MyDatabaseId

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: changing MyDatabaseId
Дата
Msg-id 22541.1289799700@sss.pgh.pa.us
обсуждение исходный текст
Ответ на changing MyDatabaseId  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: changing MyDatabaseId  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: changing MyDatabaseId  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Looking through the code, it appears to me that we'd need to do the
> following (not necessarily in this order):

Don't forget

9. Unload loadable modules that do not exist according to the new
database's catalogs; eg we don't want postgis trying to run when
its supporting tables don't exist in the selected database.
10. Somehow persuade remaining loadable modules to discard whatever
state they have that might be database-local.

We don't have workable APIs for either of those operations ATM.

I believe also that there are probably race conditions in several of
the steps you listed; in particular there is certainly a risk involved
in changing the database-we-advertise-being-connected-to versus a
concurrent DROP DATABASE.  Maybe that's easily soluble, but I'm not sure
about it.
        regards, tom lane


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: MULTISET and additional functions for ARRAY
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Latches with weak memory ordering (Re: max_wal_senders must die)