Index: src/backend/postmaster/postmaster.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/postmaster/postmaster.c,v
retrieving revision 1.408
diff -c -c -r1.408 postmaster.c
*** src/backend/postmaster/postmaster.c	11 Jul 2004 21:33:59 -0000	1.408
--- src/backend/postmaster/postmaster.c	11 Jul 2004 23:46:38 -0000
***************
*** 372,378 ****
  	InitializeGUCOptions();
  
  	userPGDATA = getenv("PGDATA");		/* default value */
- 	canonicalize_path(userPGDATA);
  	
  	opterr = 1;
  
--- 372,377 ----
***************
*** 524,529 ****
--- 523,534 ----
  		write_stderr("Try \"%s --help\" for more information.\n",
  					 progname);
  		ExitPostmaster(1);
+ 	}
+ 
+ 	if (userPGDATA)
+ 	{
+ 		userPGDATA = strdup(userPGDATA);
+ 		canonicalize_path(userPGDATA);
  	}
  
  	if (onlyConfigSpecified(userPGDATA))
Index: src/backend/utils/init/miscinit.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/utils/init/miscinit.c,v
retrieving revision 1.127
diff -c -c -r1.127 miscinit.c
*** src/backend/utils/init/miscinit.c	18 Jun 2004 06:13:54 -0000	1.127
--- src/backend/utils/init/miscinit.c	11 Jul 2004 23:46:39 -0000
***************
*** 207,216 ****
  					 errmsg("out of memory")));
  	}
  
- 	/*
- 	 * Strip any trailing slash.  Not strictly necessary, but avoids
- 	 * generating funny-looking paths to individual files.
- 	 */
  	canonicalize_path(new);
  
  	if (DataDir)
--- 207,212 ----
Index: src/backend/utils/misc/guc.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/utils/misc/guc.c,v
retrieving revision 1.216
diff -c -c -r1.216 guc.c
*** src/backend/utils/misc/guc.c	11 Jul 2004 21:48:25 -0000	1.216
--- src/backend/utils/misc/guc.c	11 Jul 2004 23:46:43 -0000
***************
*** 5441,5447 ****
  	if (doit)
  	{
  		/* We have to create a new pointer to force the change */
! 		char *canon_val = guc_strdup(FATAL, newval);
  		canonicalize_path(canon_val);
  		return canon_val;
  	}
--- 5441,5447 ----
  	if (doit)
  	{
  		/* We have to create a new pointer to force the change */
! 		char *canon_val = guc_strdup(ERROR, newval);
  		canonicalize_path(canon_val);
  		return canon_val;
  	}
