]> granicus.if.org Git - postgresql/commit
Add more critical-section calls: all code sections that hold spinlocks
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Jan 2001 21:54:01 +0000 (21:54 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Jan 2001 21:54:01 +0000 (21:54 +0000)
commit6162432de9fb023b710c171f196e27b910e45fa7
tree51bba2e60ca2d3497b365b23edd52d52574faae2
parentbe8477bc3718a05b02dd7e9f8236c16394f9a027
Add more critical-section calls: all code sections that hold spinlocks
are now critical sections, so as to ensure die() won't interrupt us while
we are munging shared-memory data structures.  Avoid insecure intermediate
states in some code that proc_exit will call, like palloc/pfree.  Rename
START/END_CRIT_CODE to START/END_CRIT_SECTION, since that seems to be
what people tend to call them anyway, and make them be called with () like
a function call, in hopes of not confusing pg_indent.
I doubt that this is sufficient to make SIGTERM safe anywhere; there's
just too much code that could get invoked during proc_exit().
17 files changed:
src/backend/access/heap/heapam.c
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtpage.c
src/backend/access/transam/xact.c
src/backend/access/transam/xlog.c
src/backend/commands/sequence.c
src/backend/commands/vacuum.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/file/fd.c
src/backend/storage/ipc/spin.c
src/backend/storage/lmgr/proc.c
src/backend/tcop/postgres.c
src/backend/utils/cache/temprel.c
src/backend/utils/init/postinit.c
src/backend/utils/mmgr/aset.c
src/include/access/xlog.h
src/include/utils/elog.h