From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Rural Hunter <ruralhunter(at)gmail(dot)com> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed |
Date: | 2012-09-25 03:00:17 |
Message-ID: | 20120925030017.GA4250@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-hackers |
On Tue, Sep 25, 2012 at 08:41:19AM +0800, Rural Hunter wrote:
> >>I think the problem is on the options when I installed pgsql(both
> >>9.1 and 9.2)
> >>Select the locale to be used by the new database cluster.
> >>
> >>Locale
> >>
> >>[1] [Default locale]
> >>[2] C
> >>[3] POSIX
> >>[4] zh_CN.utf8
> >>[5] zh_HK.utf8
> >>[6] zh_SG.utf8
> >>[7] zh_TW.utf8
> >>Please choose an option [1] : 4
> >>I chose 4 instead of 1. I guess the default locale(option 1) is with dash.
> >Well, if you run that query on template0 in the old and new cluster, you
> >will see something different in the two of them. Could you have used
> >default in one and a non-dash in the other.
> Yes, that's true. The upgrade is fine with both fresh installs(9.1
> and 9.2) with option above(without-dash). The problem only happens
> when I inited the 9.2 db with default locale(I guess that one has
OK, that is good to know. I developed the attached C program that does
the setlocale canonical test. On Debian Squeeze, I could not see any
change: if I pass en_US.UTF-8, I get en_US.UTF-8 returned; if I pass
en_US.UTF8, I get en_US.UTF8 returned. Can anyone test this and find a
case where the local is canonicalized? Run it this way:
$ canonical
LC_COLLATE = 3
LC_CTYPE = 0
$ canonical 0 en_US.UTF8
en_US.UTF8
We are looking for cases where the second argument produces a
non-matching locale name as output.
I have also attached a patch that reports the mismatching locale or
encoding names --- this should at least help with debugging and show
that a dash is the problem.
> the dash). Just wondering why pg installer provides options without
> dash.
No idea.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachment | Content-Type | Size |
---|---|---|
canonical.c | text/x-csrc | 914 bytes |
mismatch.diff | text/x-diff | 1.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Rural Hunter | 2012-09-25 04:22:43 | Re: [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed |
Previous Message | Rural Hunter | 2012-09-25 00:41:19 | Re: [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-09-25 03:21:23 | Re: Oid registry |
Previous Message | Karl O. Pinc | 2012-09-25 02:50:48 | Re: Doc patch to note which system catalogs have oids |