From 9cc0222680229c4572354cf2b3907c7ff18ad685 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Thu, 30 Oct 2008 17:04:09 +0000 Subject: [PATCH] Revert previous patch to put the shared memory segment on win32 in the Global\ namespace, because it caused permission errors on a lot of platforms. We need to come up with something better for 8.4, but for now revert to the pre-8.3.4 behaviour. --- src/backend/port/win32_shmem.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/backend/port/win32_shmem.c b/src/backend/port/win32_shmem.c index 066e0283a1..930f602b18 100644 --- a/src/backend/port/win32_shmem.c +++ b/src/backend/port/win32_shmem.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/port/win32_shmem.c,v 1.5 2008/07/04 10:50:18 mha Exp $ + * $PostgreSQL: pgsql/src/backend/port/win32_shmem.c,v 1.6 2008/10/30 17:04:09 mha Exp $ * *------------------------------------------------------------------------- */ @@ -57,7 +57,13 @@ GetSharedMemName(void) elog(FATAL, "could not generate full pathname for datadir %s: %lu", DataDir, GetLastError()); - for (cp = retptr + 18; *cp; cp++) + /* + * XXX: Intentionally overwriting the Global\ part here. This was not the + * original approach, but putting it in the actual Global\ namespace + * causes permission errors in a lot of cases, so we leave it in + * the default namespace for now. + */ + for (cp = retptr; *cp; cp++) if (*cp == '\\') *cp = '/'; -- 2.40.0