postgresql/src/include/storage
Noah Misch 2f932f71d9 Consistently test for in-use shared memory.
postmaster startup scrutinizes any shared memory segment recorded in
postmaster.pid, exiting if that segment matches the current data
directory and has an attached process.  When the postmaster.pid file was
missing, a starting postmaster used weaker checks.  Change to use the
same checks in both scenarios.  This increases the chance of a startup
failure, in lieu of data corruption, if the DBA does "kill -9 `head -n1
postmaster.pid` && rm postmaster.pid && pg_ctl -w start".  A postmaster
will no longer recycle segments pertaining to other data directories.
That's good for production, but it's bad for integration tests that
crash a postmaster and immediately delete its data directory.  Such a
test now leaks a segment indefinitely.  No "make check-world" test does
that.  win32_shmem.c already avoided all these problems.  In 9.6 and
later, enhance PostgresNode to facilitate testing.  Back-patch to 9.4
(all supported versions).

Reviewed by Daniel Gustafsson and Kyotaro HORIGUCHI.

Discussion: https://postgr.es/m/20130911033341.GD225735@tornado.leadboat.com
2019-04-03 17:03:46 -07:00
..
.gitignore When trace_lwlocks is used, identify individual lwlocks by name. 2015-09-11 14:01:39 -04:00
backendid.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
barrier.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
block.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
buf.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
buf_internals.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
buffile.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
bufmgr.h Change snapshot type to be determined by enum rather than callback. 2019-01-21 17:03:15 -08:00
bufpage.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
checksum.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
checksum_impl.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
condition_variable.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
copydir.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
dsm.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
dsm_impl.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
fd.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
freespace.h Avoid creation of the free space map for small heap relations, take 2. 2019-02-04 07:49:15 +05:30
fsm_internals.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
indexfsm.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
ipc.h Consistently test for in-use shared memory. 2019-04-03 17:03:46 -07:00
item.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
itemid.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
itemptr.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
large_object.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
latch.h Remove volatile from latch API 2019-03-04 11:30:41 +01:00
lmgr.h Report progress of CREATE INDEX operations 2019-04-02 15:18:08 -03:00
lock.h Report progress of CREATE INDEX operations 2019-04-02 15:18:08 -03:00
lockdefs.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
lwlock.h Enable parallel query with SERIALIZABLE isolation. 2019-03-15 17:47:04 +13:00
off.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pg_sema.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pg_shmem.h Consistently test for in-use shared memory. 2019-04-03 17:03:46 -07:00
pmsignal.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
predicate.h Enable parallel query with SERIALIZABLE isolation. 2019-03-15 17:47:04 +13:00
predicate_internals.h Enable parallel query with SERIALIZABLE isolation. 2019-03-15 17:47:04 +13:00
proc.h Move max_wal_senders out of max_connections for connection slot handling 2019-02-12 10:07:56 +09:00
procarray.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
proclist.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
proclist_types.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
procsignal.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
reinit.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
relfilenode.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
s_lock.h Replace @postgresql.org with @lists.postgresql.org for mailinglists 2019-01-19 19:06:35 +01:00
sharedfileset.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
shm_mq.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
shm_toc.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
shmem.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
sinval.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
sinvaladt.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
smgr.h Track unowned relations in doubly-linked list 2019-03-27 02:39:39 +01:00
spin.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
standby.h Add basic infrastructure for 64 bit transaction IDs. 2019-03-28 18:12:20 +13:00
standbydefs.h Add basic infrastructure for 64 bit transaction IDs. 2019-03-28 18:12:20 +13:00