Re: locales and indexes. - Mailing list pgsql-general

From Tom Lane
Subject Re: locales and indexes.
Date
Msg-id 11306.973869437@sss.pgh.pa.us
Whole thread Raw
In response to locales and indexes.  (Mathieu Arnold <arn_mat@club-internet.fr>)
List pgsql-general
Mathieu Arnold <arn_mat@club-internet.fr> writes:
> I ran into trouble with all my indexes when i upgraded postgresql from
> 7.0.2 to 7.0.2 with locales. I did not really found where the problem
> was but the indexes created before were messing un all the queries using
> them.
> The thing i did was drop/create with my indexes, but it shouldn't be
> necessary to do so, isn't it ?

If you're using locale support, it's essential to make sure the
postmaster is started with the same LOCALE environment variables
every time.  Otherwise you are redefining the sort order of indexes
every time you change the environment, which is a one-way ticket
to messed-up indexes.

We've heard from several people who made this mistake in the form of
sometimes starting the postmaster from the command line and sometimes
from a boot script.  Unfortunately their login environment wasn't like
the environment supplied by the boot script :-(

There is a TODO item to cause the postmaster always to adopt the LOCALE
settings that were in force when initdb ran, but it doesn't seem to be
very high priority for anyone... for now, just be careful.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Sequencial scan over primary keys
Next
From: Mathieu Arnold
Date:
Subject: Re: locales and indexes.