Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] locale issues on win32 (fix?)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: pgsql-hackers-win32(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] locale issues on win32 (fix?)
Date: 2004-04-20 01:37:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-hackers-win32
"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> * Is it enough to explicitly store/save LC_COLLATE and LC_CTYPE, or does
> more of the locale stuff need to be stored?

The other LC_xxx settings will get fixed by GUC *only* if there are
explicit settings in postgresql.conf ... I don't think you can assume that.

> * Does pgstat, startup, shutdown, checkpointer and bgwriter need to have
> the locale set as well, or can they live with defaults?

You need to fix at least LC_MESSAGES, surely, if you want errors from
these processes suitably localized.  Although in theory none of these
guys do any index operations and so should not need LC_COLLATE set,
it scares me to think of what might go wrong; probably best to fix
'em all.

Note that I am about to whack around the checkpointer and bgwriter, so
you might want to wait a day or two before you try to do this.

> (my fix only
> fixes standard backends, since they have different exec paths)

If those guys do not go through that variable-saving-and-restoring
routine, they are probably broken ipso facto.  You sure they don't?

> * Locale can't be changed "on-the-fly", if I'm correct. So just setting
> it upon exec should be enough. Or am I wrong there?

Sounds sufficient to me.  All you are doing is implementing a substitute
for the Unix copy-on-fork behavior.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: L J BayukDate: 2004-04-20 01:40:36
Subject: Re: [HACKERS] Why is libpgtcl still in CVS?
Previous:From: Christopher Kings-LynneDate: 2004-04-20 01:22:28
Subject: Re: 'begin transaction' new syntax bug?

pgsql-hackers-win32 by date

Next:From: Magnus HaganderDate: 2004-04-20 10:33:41
Subject: Re: [HACKERS] locale issues on win32 (fix?)
Previous:From: Bruce MomjianDate: 2004-04-19 22:32:39
Subject: Re: build annoyences

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group