gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SOLVED: [Gnumed-devel] Problems with bootstrap and recovery


From: Karsten Hilbert
Subject: Re: SOLVED: [Gnumed-devel] Problems with bootstrap and recovery
Date: Fri, 30 Oct 2009 12:21:57 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Fri, Oct 30, 2009 at 05:59:46AM +0100, Jerzy Luszawski wrote:

> > After install the Postres server automatically creates a "main" cluster
> > witch inherits the LC_CTYPE of the system, the problem is that it does not
> > have support for many of the locales the usual Lenny system has, as an
> > example, my "pt_BR" system got Postgres to make a "LATIN1" cluster.
> 
> This is the correct diagnosis, but the cure doesn't require complete 
> exstirpation of postgres  :)
> 
> How I would fix it:
> 0) Backup your databases (all you have, not only gnumed)!
> 1) Stop the server using pg_ctlcluster or pg_ctl (depends on your 
> distribution, see man pages for details)

On Debian, preferably /etc/init.d/postgresql-8.3 stop.

> 2) Remove the cluster: either manually delete the contents of the $PGDATA 
> directory or use pg_dropcluster if your distro has it.

On Debian: pg_dropcluster (pg_lsclusters will show you which
clusters are there).

> 3) recreate a cluster with desired locale using initdb --locale=...
> see http://www.postgresql.org/docs/8.3/static/creating-cluster.html
> and http://www.postgresql.org/docs/8.3/static/locale.html

on Debian: pg_createcluster

> 4) Restart the server using pg_ctlcluster or pg_ctl

On Debian, preferably /etc/init.d/postgresql-8.3 start

> 5) Restore databases to the new cluster or bootstrap gnumed database.
> 
> Warning: I'm not sure, but if you have other databases, changing the locale 
> may affect their restoration,

It will but the dump file contains a directive

        set client_encoding to ...

for each of them so when the cluster is utf-8 eventually
that shouldn't pose a problem.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

[Prev in Thread] Current Thread [Next in Thread]