Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9cc0222

Browse files
committed
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.
1 parent c8a18a2 commit 9cc0222

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/backend/port/win32_shmem.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $PostgreSQL: pgsql/src/backend/port/win32_shmem.c,v 1.5 2008/07/04 10:50:18 mha Exp $
9+
* $PostgreSQL: pgsql/src/backend/port/win32_shmem.c,v 1.6 2008/10/30 17:04:09 mha Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -57,7 +57,13 @@ GetSharedMemName(void)
5757
elog(FATAL, "could not generate full pathname for datadir %s: %lu",
5858
DataDir, GetLastError());
5959

60-
for (cp = retptr + 18; *cp; cp++)
60+
/*
61+
* XXX: Intentionally overwriting the Global\ part here. This was not the
62+
* original approach, but putting it in the actual Global\ namespace
63+
* causes permission errors in a lot of cases, so we leave it in
64+
* the default namespace for now.
65+
*/
66+
for (cp = retptr; *cp; cp++)
6167
if (*cp == '\\')
6268
*cp = '/';
6369

0 commit comments

Comments
 (0)