Get rid of the dynamic shared memory state file.
Robert Haas <rhaas@postgresql.org>
Get rid of the dynamic shared memory state file. Instead of storing the ID of the dynamic shared memory control segment in a file within the data directory, store it in the main control segment. This avoids a number of nasty corner cases, most seriously that doing an online backup and then using it on the same machine (e.g. to fire up a standby) would result in the standby clobbering all of the master's dynamic shared memory segments. Per complaints from Heikki Linnakangas, Fujii Masao, and Tom Lane.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/port/sysv_shmem.c | modified | +10 −2 |
| src/backend/port/win32_shmem.c | modified | +5 −1 |
| src/backend/storage/ipc/dsm.c | modified | +41 −159 |
| src/backend/storage/ipc/ipci.c | modified | +4 −2 |
| src/include/storage/dsm.h | modified | +7 −1 |
| src/include/storage/pg_shmem.h | modified | +4 −1 |