-
- Downloads
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().
Showing
- src/backend/access/heap/heapam.c 7 additions, 7 deletionssrc/backend/access/heap/heapam.c
- src/backend/access/nbtree/nbtinsert.c 7 additions, 7 deletionssrc/backend/access/nbtree/nbtinsert.c
- src/backend/access/nbtree/nbtpage.c 5 additions, 5 deletionssrc/backend/access/nbtree/nbtpage.c
- src/backend/access/transam/xact.c 5 additions, 5 deletionssrc/backend/access/transam/xact.c
- src/backend/access/transam/xlog.c 12 additions, 12 deletionssrc/backend/access/transam/xlog.c
- src/backend/commands/sequence.c 5 additions, 5 deletionssrc/backend/commands/sequence.c
- src/backend/commands/vacuum.c 9 additions, 9 deletionssrc/backend/commands/vacuum.c
- src/backend/storage/buffer/bufmgr.c 31 additions, 14 deletionssrc/backend/storage/buffer/bufmgr.c
- src/backend/storage/file/fd.c 9 additions, 3 deletionssrc/backend/storage/file/fd.c
- src/backend/storage/ipc/spin.c 31 additions, 4 deletionssrc/backend/storage/ipc/spin.c
- src/backend/storage/lmgr/proc.c 6 additions, 23 deletionssrc/backend/storage/lmgr/proc.c
- src/backend/tcop/postgres.c 3 additions, 3 deletionssrc/backend/tcop/postgres.c
- src/backend/utils/cache/temprel.c 2 additions, 3 deletionssrc/backend/utils/cache/temprel.c
- src/backend/utils/init/postinit.c 5 additions, 4 deletionssrc/backend/utils/init/postinit.c
- src/backend/utils/mmgr/aset.c 19 additions, 17 deletionssrc/backend/utils/mmgr/aset.c
- src/include/access/xlog.h 2 additions, 2 deletionssrc/include/access/xlog.h
- src/include/utils/elog.h 5 additions, 6 deletionssrc/include/utils/elog.h
Loading
Please register or sign in to comment