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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Howto change db cluster locale on-the-fly
Дата
Msg-id 9621.1171898357@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Howto change db cluster locale on-the-fly  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Howto change db cluster locale on-the-fly
Список pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
>> But I guess something like this would work:
>> 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.

But "name" is not locale-aware --- it just uses strcmp().  AFAIR there
aren't any locale-dependent indexes in the system catalogs.  So in
principle you could hack pg_control, restart the postmaster, and then
reindex every locale-dependent index.  Hacking pg_control would be the
hard part; you'll never get the CRC right if you do it manually.  Possibly
pg_resetxlog could be adapted to the purpose.

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

Yup, a filesystem backup would be a *real* good idea.  Not to mention
testing the procedure on a toy installation.
        regards, tom lane


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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: New feature request: FlashBack Query
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_proc without oid?