X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 0E77D9DC80F for ; Wed, 28 Dec 2005 13:40:56 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 10006-04 for ; Wed, 28 Dec 2005 13:40:55 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.ringways.co.uk (host-80-193-83-130.static.telewest.net [80.193.83.130]) by postgresql.org (Postfix) with ESMTP id A41879DC857 for ; Wed, 28 Dec 2005 13:40:53 -0400 (AST) Received: from eddie.ringways.co.uk ([10.1.1.115]) by mail.ringways.co.uk with esmtp (Exim 4.54) id 1ErfGK-0006k9-Kb for pgsql-admin@postgresql.org; Wed, 28 Dec 2005 17:39:05 +0000 From: Gary Stainburn Organization: Ringways Garages Ltd To: pgsql-admin@postgresql.org Subject: Re: restored database locale problem Date: Wed, 28 Dec 2005 17:39:00 +0000 User-Agent: KMail/1.8.2 References: <200512281453.01568.gary.stainburn@ringways.co.uk> <200512281607.30488.gary.stainburn@ringways.co.uk> <17656.1135786926@sss.pgh.pa.us> In-Reply-To: <17656.1135786926@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512281739.00503.gary.stainburn@ringways.co.uk> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200512/350 X-Sequence-Number: 20070 On Wednesday 28 December 2005 16:22, Tom Lane wrote: > Gary Stainburn writes: > > goole=# show lc_ctype; > > lc_ctype > > ------------- > > en_US.UTF-8 > > (1 row) > > > > goole=# show server_encoding; > > server_encoding > > ----------------- > > UNICODE > > (1 row) > > Hm. Well, the error message implies that there's some data in the > database that we think is valid but mbstowcs() doesn't agree. If this > is a pre-8.1 release then you could be getting burnt by the bugs we > previously had with more-than-two-byte UTF8 sequences. I'm using the Fedora 4 RPMs version 8.0.4-2. 8.0.5-1 are the latest, which I'm going to upgrade to using yum. > > > This has arisen from reading back into an existing server config a > > pg_dump that was taken from the same server. > > Do you see the error if you just EXPLAIN the problem query, without > executing it? Running explain does not generate any errors. > If so, the failure is probably happening because a bogus > data value happens to show up in the pg_stats statistics for one of the > columns used in the query. Since these entries come from a random > sample, re-ANALYZE-ing the table will probably make the EXPLAIN error > come and go. Which leaves you needing to grovel through the whole table > to find the bad data :-( > > regards, tom lane analyze requests; seems to have fixed it. Thanks. Gary -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000