Re: [HACKERS] Howto change db cluster locale on-the-fly

2007-02-22 Thread Jakub Ouhrabka
Thanks for your answer. Is there any other risk than wrong answers when running with wrong locale? So maybe the best bet would be: 1) drop all text/varchar user indexes 2) stop database, change the locale 3) in single user mode reindex shared tables and system tables in all databases and templ

Re: [HACKERS] Howto change db cluster locale on-the-fly

2007-02-19 Thread Jakub Ouhrabka
Hi Tom, > 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. thanks for your valuable answer! I looked at pg_resetxlog.c but I'm no pg internals' expert - would something like this work?

Re: [HACKERS] Howto change db cluster locale on-the-fly

2007-02-19 Thread Tom Lane
Martijn van Oosterhout 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"

Re: [HACKERS] Howto change db cluster locale on-the-fly

2007-02-19 Thread Martijn van Oosterhout
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 i

[HACKERS] Howto change db cluster locale on-the-fly

2007-02-19 Thread Jakub Ouhrabka
Hi, we've made mistake and initdb database cluster in wrong locale :-( Now it's full of data. I've read in the docs that it's not possible to change locale. But I guess something like this would work: a) 1) drop all indexes on text/varchar columns 2) change cluster locale 3) create all index