Thread: pgsql: Put in place some defenses against being fooled by accidental

pgsql: Put in place some defenses against being fooled by accidental

From
tgl@svr1.postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Put in place some defenses against being fooled by accidental match of
shared memory segment ID.  If we can't access the existing shmem segment,
it must not be relevant to our data directory.  If we can access it,
then attach to it and check for an actual match to the data directory.
This should avoid some cases of failure-to-restart-after-boot without
introducing any significant risk of failing to detect a still-running
old backend.

Modified Files:
--------------
    pgsql/src/backend/port:
        sysv_shmem.c (r1.39 -> r1.40)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/port/sysv_shmem.c.diff?r1=1.39&r2=1.40)
    pgsql/src/include/storage:
        pg_shmem.h (r1.11 -> r1.12)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/pg_shmem.h.diff?r1=1.11&r2=1.12)