gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] bootstrap error on Mandriva 2010 - solved


From: Sebastian Hilbert
Subject: Re: [Gnumed-devel] bootstrap error on Mandriva 2010 - solved
Date: Thu, 11 Mar 2010 09:13:20 +0100
User-agent: KMail/1.13.1 (Linux/2.6.31.12-0.1-default; KDE/4.4.1; i686; ; )

Am Samstag 06 März 2010 20:06:15 schrieb Michael Schütt:
>     return _cursor.execute(self, query, vars, async)
> DataError: new encoding (UTF8) is incompatible with the encoding of the
> template database (SQL_ASCII)
> TIP:  Use the same encoding as in the template database, or use
> template0 as template. 

This report indicates that for some reason an SQL_ASCII cluster gets created.
My tests indicate that it should be safe to remove it and replace it by an 
UTF-8 cluster.

However if you need your SQL_ASCII cluster see below.
To initialize a second cluster in another directory issue these commands as 
root

mkdir /var/lib/pgsql/data1
chown postgres /var/lib/pgsql/data1

- as user postgres (via 'su postgres' ) do:

/us/bin/initdb --locale=de_DE.UTF-8 -D /var/lib/pgsql/data1

- Now change into that directory

cd /var/lib/pgsql/data1/ 

- and edit postgresql.conf and set the line #port = 5432 to
port = 5433 
- make sure to strip away the # in front
- now you have to tell the bootstrap script that postgres is listening on port 
5433

- go to /usr/lib/gnumed-server/bootstrap and edit bootstrap-latest.sh

- find the line '#export GM_DB_PORT=5433' and 
- remove the # to activate it.

- to start the second cluster on port 5433 as user postgres run

'pg_ctl -D /var/lib/pgsql/data1 start'

-- to stop it run as postgres

'pg_ctl -D /var/lib/pgsql/data1 stop' 

- now run as root

gm-boostrap_server

This is tested and works. You can verify that the second server is running on 
port 5433 by running as user postgres:

'psql -p 5433 -l'

What is left is a way to automatically cater for the above situation. I 
recommend to extend the script 'postgresql 'in /etc/init.d' but this exercise 
is left to the user.

Don't forget to edit your config file to tell the client that the server is on 
port 5433. One way to do this is to edit /etc/gnumed/gnumed-client.conf. Find 
the line port in the profile of your choice and replace 5432 by 5433.

I would be glad if anyone could post all this to the Mandriva page in our Wiki 

Best regards,
Sebastian




reply via email to

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