pgsql: Get rid of the dynamic shared memory state file. - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Get rid of the dynamic shared memory state file.
Date
Msg-id E1WXYDT-0006yT-0Y@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Get rid of the dynamic shared memory state file.  (Andres Freund <andres@2ndquadrant.com>)
Re: pgsql: Get rid of the dynamic shared memory state file.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/11a65eed1637a05b03e174700799b024e104bfb4

Modified Files
--------------
src/backend/port/sysv_shmem.c  |   12 ++-
src/backend/port/win32_shmem.c |    6 +-
src/backend/storage/ipc/dsm.c  |  200 ++++++++--------------------------------
src/backend/storage/ipc/ipci.c |    6 +-
src/include/storage/dsm.h      |    8 +-
src/include/storage/pg_shmem.h |    5 +-
6 files changed, 71 insertions(+), 166 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Add new to_reg* functions for error-free OID lookups.
Next
From: Robert Haas
Date:
Subject: pgsql: doc: Fix typo.