postgresql/src/include/storage
Andres Freund 59f71a0d0b Add a default local latch for use in signal handlers.
To do so, move InitializeLatchSupport() into the new common process
initialization functions, and add a new global variable MyLatch.

MyLatch is usable as soon InitPostmasterChild() has been called
(i.e. very early during startup). Initially it points to a process
local latch that exists in all processes. InitProcess/InitAuxiliaryProcess
then replaces that local latch with PGPROC->procLatch. During shutdown
the reverse happens.

This is primarily advantageous for two reasons: For one it simplifies
dealing with the shared process latch, especially in signal handlers,
because instead of having to check for MyProc, MyLatch can be used
unconditionally. For another, a later patch that makes FEs/BE
communication use latches, now can rely on the existence of a latch,
even before having gone through InitProcess.

Discussion: 20140927191243.GD5423@alap3.anarazel.de
2015-01-14 18:45:22 +01:00
..
backendid.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
barrier.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
block.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
buf.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
buf_internals.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
buffile.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
bufmgr.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
bufpage.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
checksum.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
checksum_impl.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
copydir.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
dsm.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
dsm_impl.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
fd.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
freespace.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
fsm_internals.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
indexfsm.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
ipc.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
item.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
itemid.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
itemptr.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
large_object.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
latch.h Add a default local latch for use in signal handlers. 2015-01-14 18:45:22 +01:00
lmgr.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
lock.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
lwlock.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
off.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_sema.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_shmem.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pmsignal.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pos.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
predicate.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
predicate_internals.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
proc.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
procarray.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
procsignal.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
reinit.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
relfilenode.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
s_lock.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
shm_mq.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
shm_toc.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
shmem.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
sinval.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
sinvaladt.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
smgr.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
spin.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
standby.h Update copyright for 2015 2015-01-06 11:43:47 -05:00