Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 22443B623C0 for ; Wed, 1 Jun 2011 15:29:11 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 42462-03 for ; Wed, 1 Jun 2011 18:29:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by mail.postgresql.org (Postfix) with SMTP id B6911B623BF for ; Wed, 1 Jun 2011 15:29:03 -0300 (ADT) Received: (qmail invoked by alias); 01 Jun 2011 18:29:00 -0000 Received: from a88-115-218-165.elisa-laajakaista.fi (EHLO [10.0.0.101]) [88.115.218.165] by mail.gmx.net (mp056) with SMTP; 01 Jun 2011 20:29:00 +0200 X-Authenticated: #495269 X-Provags-ID: V01U2FsdGVkX1/Z2+Iiu3LZ68+yUooipZYvwuqo00E0npCZ69U9kw kfHiRq4jT7udH/ Subject: Re: [BUGS] BUG #6034: pg_upgrade fails when it should not. From: Peter Eisentraut To: Tom Lane Cc: Bruce Momjian , Robert Haas , Tim Uckun , PostgreSQL-development In-Reply-To: <21309.1306948863@sss.pgh.pa.us> References: <201105241959.p4OJxxL05180@momjian.us> <1306942821.2279.0.camel@vanquo.pezone.net> <21309.1306948863@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" Date: Wed, 01 Jun 2011 21:28:56 +0300 Message-ID: <1306952936.2279.2.camel@vanquo.pezone.net> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201106/47 X-Sequence-Number: 188760 On ons, 2011-06-01 at 13:21 -0400, Tom Lane wrote: > Peter Eisentraut writes: > >>> I think you misread what I wrote, or I misexplained it, but never > >>> mind. Matching locale names case-insensitively sounds reasonable to > >>> me, unless someone has reason to believe it will blow up. > > > On FreeBSD, locale names appear to be case-sensitive: > > > $ LC_ALL=en_US.UTF-8 locale charmap > > UTF-8 > > > $ LC_ALL=en_US.utf-8 locale charmap > > US-ASCII > > Hm, surely the latter result indicates that "en_US.utf-8" is not in fact > a valid locale name? > > It would only be a problem if different case-foldings of the same name > represented valid but different locales on some platform, and that seems > rather hard to believe (it would be a pretty foolish choice no?). Well, initdb still succeeds if you give it an invalid locale name. It warns, but that can easily be missed if initdb is hidden behind a few other layers. If you then run pg_upgrade, you get a hosed instance.