Re: Re: BUG #4319: lower()/upper() does not know about UNICODE case mapping - Mailing list pgsql-bugs

From Tomasz Ostrowski
Subject Re: Re: BUG #4319: lower()/upper() does not know about UNICODE case mapping
Date
Msg-id 48872D01.6060806@batory.org.pl
Whole thread Raw
In response to Re: BUG #4319: lower()/upper() does not know about UNICODE case mapping  (valgog <valgog@gmail.com>)
List pgsql-bugs
On 2008-07-23 11:48, valgog wrote:

> Another question. Is it possible to change the current Database
> LC_CTYPE on the database without recreating it with initdb and
> reimporting all the data.

No.

> I would rather prefer my indexes recreated, rather then reimporting
> database (cannot afford such a long time out of service :(

You can use slony replication for minimal downtime (seconds), but it is
rather complicated.

You can also seriously reduce reimport time by:
- temporary disabling sync;
- temporary enabling hard disk write cache;
- importing and exporting concurrently with a pipe:
    old_pgdata = /var/lib/pgsql/data
    new_pgdata = /var/lib/pgsql/newdata
    initdb -D $new_pgdata
    postgres -p 10001 -F -D $new_pgdata &
    su -c 'service postgresql stop'
    postgres -p 10002 -F -D $old_pgdata &
    pg_dumpall -p 10002 | pg_restore -p 10001
    killall postgres
    mv $old_pgdata $old_pgdata.bak
    mv $new_pgdata $old_pgdata
    su -c 'service postgresql start'
- importing and exporting from one disk or cluster to another

Regards
Tometzky
--
...although Eating Honey was a very good thing to do, there was a
moment just before you began to eat it which was better than when you
were...
                                                      Winnie the Pooh

pgsql-bugs by date:

Previous
From: valgog
Date:
Subject: Re: BUG #4319: lower()/upper() does not know about UNICODE case mapping
Next
From: "Alexandre Caneo"
Date:
Subject: BUG #4322: Problems with field not updatable