pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Rural Hunter <ruralhunter@gmail.com>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed
Date: Tue, 25 Sep 2012 09:10:33 -0400
Message-ID: <20120925131033.GB4250@momjian.us> (raw)
In-Reply-To: <50613193.4010204@gmail.com>
References: <505F1A98.9090901@gmail.com>
	<1348440393.18490.2.camel@vanquo.pezone.net>
	<20120924125500.GA21242@momjian.us>
	<50606726.3050802@gmail.com>
	<20120924142659.GC21242@momjian.us>
	<5060720E.1080903@gmail.com>
	<20120924145731.GE21242@momjian.us>
	<5060FDAF.8020407@gmail.com>
	<20120925030017.GA4250@momjian.us>
	<50613193.4010204@gmail.com>

On Tue, Sep 25, 2012 at 12:22:43PM +0800, Rural Hunter wrote:
> >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.
> It matches on my system(ubuntu 10.10 server):
> $ ./canonical
> LC_COLLATE = 3
> LC_CTYPE = 0
> $ ./canonical 0 zh_CN.UTF-8
> zh_CN.UTF-8
> $ ./canonical 0 zh_CN.UTF8
> zh_CN.UTF8
> $ ./canonical 0 zh_CN.utf8
> zh_CN.utf8
> $ ./canonical 0 zh_CN.utf-8
> zh_CN.utf-8
> 
> I tested the checker with the patch:
> $ /opt/PostgreSQL/9.2/bin/pg_upgrade -b /opt/PostgreSQL/9.1/bin -B
> /opt/PostgreSQL/9.2/bin -d /raid/pgsql -D /raid/pg92data -c
> Performing Consistency Checks
> -----------------------------
> Checking current, bin, and data directories ok
> Checking cluster versions ok
> Checking database user is a superuser ok
> Checking for prepared transactions ok
> Checking for reg* system OID user data types ok
> Checking for contrib/isn with bigint-passing mismatch ok
> 
> lc_collate cluster values do not match: old "zh_CN.utf8", new "zh_CN.UTF-8"
> Failure, exiting
> 
> zh_CN.utf8 is provided by the installer and zh_CN.UTF-8 is my system
> default.

OK, this tells us that the canonicalization code used in initdb is not
going to help us in pg_upgrade, at least not on your system, and not on
mine.

I think we should apply the patch that fixes the TOAST problem with
information_schema, and the patch that outputs the old/new values for
easier debugging.  Other than that, I don't know what else we can do
except to ignore dashes when comparing locale names, which I am told is
unacceptable.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +




view thread (49+ messages)  latest in thread

Message-ID: <20120925131033.GB4250@momjian.us>
Permalink:  ../20120925131033.GB4250@momjian.us/
Also on:    postgresql.org/message-id/20120925131033.GB4250@momjian.us

 · 

reply

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: bruce@momjian.us, ruralhunter@gmail.com, peter_e@gmx.net, pgsql-hackers@postgresql.org, tgl@sss.pgh.pa.us
  Subject: Re: [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed
  In-Reply-To: <20120925131033.GB4250@momjian.us>
  References: <505F1A98.9090901@gmail.com> <1348440393.18490.2.camel@vanquo.pezone.net> <20120924125500.GA21242@momjian.us> <50606726.3050802@gmail.com> <20120924142659.GC21242@momjian.us> <5060720E.1080903@gmail.com> <20120924145731.GE21242@momjian.us> <5060FDAF.8020407@gmail.com> <20120925030017.GA4250@momjian.us> <50613193.4010204@gmail.com> <20120925131033.GB4250@momjian.us>

* 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