summaryrefslogtreecommitdiff
path: root/src/backend/port/win32_shmem.c
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2019-04-05 00:00:52 -0700
committerNoah Misch <noah@leadboat.com>2019-04-05 00:00:55 -0700
commitae98c24fda4bf74c721f8a3c270d5049a1d29cd4 (patch)
treefdc64279d60efcf942b131490b8102299468da96 /src/backend/port/win32_shmem.c
parent7ff7c0d7b71c6ec638549c3accd54ccdddf3232e (diff)
Revert "Consistently test for in-use shared memory."
This reverts commits 2f932f71d9f2963bbd201129d7b971c8f5f077fd, 16ee6eaf80a40007a138b60bb5661660058d0422 and 6f0e190056fe441f7cf788ff19b62b13c94f68f3. The buildfarm has revealed several bugs. Back-patch like the original commits. Discussion: https://postgr.es/m/20190404145319.GA1720877@rfd.leadboat.com
Diffstat (limited to 'src/backend/port/win32_shmem.c')
-rw-r--r--src/backend/port/win32_shmem.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/backend/port/win32_shmem.c b/src/backend/port/win32_shmem.c
index fd336c35626..0ff2c7eb667 100644
--- a/src/backend/port/win32_shmem.c
+++ b/src/backend/port/win32_shmem.c
@@ -109,9 +109,14 @@ PGSharedMemoryIsInUse(unsigned long id1, unsigned long id2)
*
* Create a shared memory segment of the given size and initialize its
* standard header.
+ *
+ * makePrivate means to always create a new segment, rather than attach to
+ * or recycle any existing segment. On win32, we always create a new segment,
+ * since there is no need for recycling (segments go away automatically
+ * when the last backend exits)
*/
PGShmemHeader *
-PGSharedMemoryCreate(Size size, int port,
+PGSharedMemoryCreate(Size size, bool makePrivate, int port,
PGShmemHeader **shim)
{
void *memAddress;