Re: Re: BUG #4319: lower()/upper() does not know about UNICODE case mapping

From: Tomasz Ostrowski <tometzky(at)batory(dot)org(dot)pl>
To: valgog <valgog(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Re: BUG #4319: lower()/upper() does not know about UNICODE case mapping
Date: 2008-07-23 13:07:13
Message-ID: 48872D01.6060806@batory.org.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexandre Caneo 2008-07-23 20:16:26 BUG #4322: Problems with field not updatable
Previous Message valgog 2008-07-23 09:50:40 Re: BUG #4319: lower()/upper() does not know about UNICODE case mapping