Forum OpenACS Development: Locale Issue and PG 7.1.2 RPMs

Collapse
Posted by Jonathan Marsden on
For OACS4, the PG 7.1.2 RPMs do the *wrong* thing, in that they install and run PG using the locale set up in /etc/sysconfig/i18n (in Red Hat).

Under Red Hat, the quick fix for now is to do

echo LANG=C >>/etc/sysconfig/i18n

*before* installing PG (from RPMs) and bringing it up for the first time (in particular, before it runs initdb).

Once you have installed the PG 7.1.2 RPMs and done /sbin/service postgresql start for the first time (which does the initdb), you can then remove the added line from your /etc/sysconfig/i18n , which sets things back to your native locale (often LANG=en_US) if you so wish.

This is a bad situation (ideally, OACS4 would work no matter what locale PG was using?), but one I thought Don had recently put a patch into the OACS4 installer to check for?

Note: To try this, you'll need to rpm -e postgresql-server and then rm -rf /var/lib/pgsql to get rid of your old database, then reinstall PG with the edited i18n file. Otherwise your old db with its unwanted locale info will be retained.