Re: Repeatedly breaking indexes - SOLVED

From: Martin Edlman <edlman(at)fortech(dot)cz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Repeatedly breaking indexes - SOLVED
Date: 2003-12-02 07:13:10
Message-ID: Pine.LNX.4.44.0312020758300.7095-100000@worm.fortech.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> "ps" is not a reliable guide to the locale settings being used by
> Postgres.

Maybe it's RedHat related, I don't know.
When I had en_US in /etc/sysconfig/i18n and cs_CZ in
~postgres/.bash_profile and when I did (as root) `su - postgres -s /bin/sh
-c "echo $LANG"' I saw LANG=en_US (!!!), when I did `su - postgres' and
then `echo $LANG' (as postgres) I saw LANG=cs_CZ.
So I believe that ps gives correct info and I believe that postmaster was
running with en_US locales. It seems that the problem is with `su' which
may not run user's .bash* scripts when executing command with -c.

> The postmaster will adopt LC_COLLATE and LC_CTYPE from the settings
> recorded in pg_control (by initdb) regardless of its environment.

That's what I was hoping for, but unfortunately I didn't work this way.

I isolated the problem when trying Pg on different HW. I installed RH from
install CD and fortunatelly installed it with cs_CZ as default. Then
evertyhing worked - the same Pg, the same database. After that I looked at
`ps axe' and saw the difference in LANG.

> So I'm not convinced that you've correctly identified the problem.
> However, it seems possible that part of the issue is misbehavior if
> the various LC_xxx settings aren't all alike --- could you dig further
> and try to isolate it?

I set ALL LC_xxx variables to cs_CZ in postgres.conf but it didn't help.
Only setting LANG to cs_CZ in systemwide settings.

Regards, Martin

--

Martin Edlman
Fortech s.r.o, Litomysl
Public PGP key: http://edas.visaci.cz/#keys

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message cnliou 2003-12-02 12:40:20 Setting time zone commands
Previous Message Richard Welty 2003-12-02 03:49:27 Re: Misplaced modifier in Postgresql license