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

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Put in place some defenses against being fooled by accidental
Date: 2004-11-09 21:30:28
Message-ID: 20041109213028.88F733A3EDA@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2004-11-09 21:42:58 pgsql: Allow planner to fold "stable" functions to constants when
Previous Message Tom Lane 2004-11-09 20:35:25 pgsql: In PGSharedMemoryIsInUse, assume that EACCES indicates a shmem