From: Dan Libby <dan@libby.com>
To: pgsql-admin@postgresql.org
Subject: Re: dump/restore results in duplicate key violation with 7.4.6.
Date: Sun, 07 Nov 2004 23:48:55 -0600
Message-ID: <418F08C7.60305@libby.com> (raw)
In-Reply-To: <418BE4A2.1060506@libby.com>
References: <418BD67D.1010108@osc.co.cr>
<418BE4A2.1060506@libby.com>
Update.
After Tom mentioned that my issue might be locale related I ran
pg_controldata on both servers.
On gentoo, LC_COLLATE and LC_CTYPE are set to C locale. On Redhat they
are set to en_US.UTF-8.
I re-ran initdb on Redhat with the --locale=C param, and performed the
import again. This time all data imported correctly.
That is great, as it enables me to move forward, but there's still a
couple open questions:
1) I don't understand why a difference in locale should cause a
duplicate key error, especially when both databases were created using
'UNICODE' encoding. Is this valid behavior or a postgres bug?
2) According to the docs [1], locale is set at initdb time. The redhat
machine is a production server and has other databases running for other
applications. I could do a dump of all data, then initdb, then import
data, but it occurs to me that I might run into a similar "duplicate
key" error (or other import strangeness) in one of the other databases.
Can anyone shed more light on the implications of moving data from
en_US.UTF-8 locale to C locale?
regards,
Dan Libby
[1] http://www.postgresql.org/docs/7.4/static/charset.html
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: dan@libby.com
Subject: Re: dump/restore results in duplicate key violation with 7.4.6.
In-Reply-To: <418F08C7.60305@libby.com>
References: <418BD67D.1010108@osc.co.cr> <418BE4A2.1060506@libby.com> <418F08C7.60305@libby.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox