Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2635400

Browse files
committed
Online upgrade withpout EXEC_BACKEND
1 parent f9a1349 commit 2635400

File tree

12 files changed

+218
-72
lines changed

12 files changed

+218
-72
lines changed

src/backend/port/sysv_shmem.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, Size size)
136136
* interest for anything except debugging, we'd probably create a cleaner
137137
* and better-documented way to set it, such as a GUC.)
138138
*/
139-
#ifdef EXEC_BACKEND
140139
{
141140
char *pg_shmem_addr = getenv("PG_SHMEM_ADDR");
142141

@@ -147,7 +146,6 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, Size size)
147146
{
148147
mode &= ~IPC_EXCL;
149148
}
150-
#endif
151149

152150
shmid = shmget(memKey, size, mode);
153151
if (shmid < 0)
@@ -251,7 +249,7 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, Size size)
251249
if (memAddress == (void *) -1)
252250
elog(FATAL, "shmat(id=%d, addr=%p, flags=0x%x) failed: %m",
253251
shmid, requestedAddress, PG_SHMAT_FLAGS);
254-
252+
elog(LOG, "Map shared memory to %p", memAddress);
255253
/* Register on-exit routine to detach new segment before deleting */
256254
on_shmem_exit(IpcMemoryDetach, PointerGetDatum(memAddress));
257255

@@ -792,8 +790,6 @@ PGSharedMemoryCreate(Size size,
792790
return (PGShmemHeader *) AnonymousShmem;
793791
}
794792

795-
#ifdef EXEC_BACKEND
796-
797793
/*
798794
* PGSharedMemoryReAttach
799795
*
@@ -872,7 +868,6 @@ PGSharedMemoryNoReAttach(void)
872868
UsedShmemSegID = 0;
873869
}
874870

875-
#endif /* EXEC_BACKEND */
876871

877872
/*
878873
* PGSharedMemoryDetach

src/backend/postmaster/bgworker.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,6 @@ ResetBackgroundWorkerCrashTimes(void)
572572
}
573573
}
574574

575-
#ifdef EXEC_BACKEND
576575
/*
577576
* In EXEC_BACKEND mode, workers use this to retrieve their details from
578577
* shared memory.
@@ -603,7 +602,6 @@ SetBackgroundWorkerEntries(void* entries)
603602
{
604603
BackgroundWorkerData = entries;
605604
}
606-
#endif
607605

608606
/*
609607
* Complain about the BackgroundWorker definition using error level elevel.

0 commit comments

Comments
 (0)