Re: Howto change db cluster locale on-the-fly

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Howto change db cluster locale on-the-fly
Дата
Msg-id 20070219095405.GB30737@svana.org
обсуждение исходный текст
Ответ на Howto change db cluster locale on-the-fly  (Jakub Ouhrabka <kuba@comgate.cz>)
Ответы Re: Howto change db cluster locale on-the-fly
Re: Howto change db cluster locale on-the-fly
Список pgsql-hackers
On Mon, Feb 19, 2007 at 09:27:06AM +0100, Jakub Ouhrabka wrote:
> But I guess something like this would work:
>
> a)
> 1) drop all indexes on text/varchar columns
> 2) change cluster locale
> 3) create all indexes on text/varchar columns

You're going to miss the "name" columns, ie. every string index in
pg_catalog. Also, there are shared tables which all used in every DB.
You need to log into every DB in the cluster (don't forget template[01]
and reindex everything.

So, REINDEX DATABASE; seems to be a safer bet. In general this doesn't
actually work since changing the locale may make two strings equal that
wern't before, thus possibly breaking a unique index, but it may be
possible.

I'd suggest single user mode at least, and make backups!

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

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

Предыдущее
От: Tom Dunstan
Дата:
Сообщение: Re: "anyelement2" pseudotype
Следующее
От: Andreas 'ads' Scherbaum
Дата:
Сообщение: Re: New feature request: FlashBack Query