*** postmaster.c.orig	Mon Apr 19 22:53:37 2004
--- postmaster.c	Mon Apr 19 22:58:45 2004
***************
*** 3305,3310 ****
--- 3305,3312 ----
  {
  	char	filename[MAXPGPATH];
  	FILE	*fp;
+ 	char    localebuf[64];
+ 
  	get_tmp_backend_file_name(filename,++tmpBackendFileNum);
  
  	/* Open file */
***************
*** 3359,3364 ****
--- 3361,3371 ----
  	write_var(debug_flag,fp);
  	write_var(PostmasterPid,fp);
  
+ 	strcpy(localebuf, setlocale(LC_COLLATE, NULL));
+ 	write_var(localebuf,fp);
+ 	strcpy(localebuf, setlocale(LC_CTYPE, NULL));
+ 	write_var(localebuf,fp);
+ 
  	/* Release file */
  	if (FreeFile(fp))
  	{
***************
*** 3376,3381 ****
--- 3383,3389 ----
  {
  	char	filename[MAXPGPATH];
  	FILE	*fp;
+ 	char    localebuf[64];
  	get_tmp_backend_file_name(filename,id);
  
  	/* Open file */
***************
*** 3420,3425 ****
--- 3428,3438 ----
  	read_var(PreAuthDelay,fp);
  	read_var(debug_flag,fp);
  	read_var(PostmasterPid,fp);
+ 
+ 	read_var(localebuf,fp);
+ 	setlocale(LC_COLLATE, localebuf);
+ 	read_var(localebuf,fp);
+ 	setlocale(LC_CTYPE, localebuf);
  
  	/* Release file */
  	FreeFile(fp);
