Re: Does EXEC_BACKEND mode still need to propagate setlocale settings? - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Does EXEC_BACKEND mode still need to propagate setlocale settings?
Date
Msg-id 4A54E971.6060609@enterprisedb.com
Whole thread Raw
In response to Does EXEC_BACKEND mode still need to propagate setlocale settings?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Does EXEC_BACKEND mode still need to propagate setlocale settings?
List pgsql-hackers
Tom Lane wrote:
> The recent bug report about CheckMyDatabase() failing to use
> pg_perm_setlocale() led me to look for other uses of setlocale() that
> might be wrong.  I found two fishy calls in restore_backend_variables().

I just did the exact same thing but you beat me..

> I am thinking though that the correct fix is to delete them and get
> rid of the overhead of transmitting the postmaster's setlocale settings
> to child processes this way.  A regular backend is going to do
> CheckMyDatabase momentarily, and in any case it seems to me that the
> postmaster hasn't bothered to change these values off the system defaults
> and so there is no need to do anything special to inherit its values.

Agreed. In EXEC_BACKEND case, main() sets them to the same system
defaults before restore_backend_variables() is called.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [pgsql-www] commitfest.postgresql.org
Next
From: Tom Lane
Date:
Subject: Re: Does EXEC_BACKEND mode still need to propagate setlocale settings?