summaryrefslogtreecommitdiff
path: root/src/include/access/xlog.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-01-12 21:54:01 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-01-12 21:54:01 +0000
commit6162432de9fb023b710c171f196e27b910e45fa7 (patch)
tree51bba2e60ca2d3497b365b23edd52d52574faae2 /src/include/access/xlog.h
parentbe8477bc3718a05b02dd7e9f8236c16394f9a027 (diff)
downloadpostgresql-6162432de9fb023b710c171f196e27b910e45fa7.tar.gz
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().
Diffstat (limited to 'src/include/access/xlog.h')
-rw-r--r--src/include/access/xlog.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h
index 88268b0b0b..7736ec92e8 100644
--- a/src/include/access/xlog.h
+++ b/src/include/access/xlog.h
@@ -3,7 +3,7 @@
*
* PostgreSQL transaction log manager
*
- * $Header: /cvsroot/pgsql/src/include/access/xlog.h,v 1.15 2000/12/28 13:00:25 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/include/access/xlog.h,v 1.16 2001/01/12 21:54:01 tgl Exp $
*/
#ifndef XLOG_H
#define XLOG_H
@@ -101,7 +101,7 @@ typedef XLogPageHeaderData *XLogPageHeader;
extern StartUpID ThisStartUpID; /* current SUI */
extern bool InRecovery;
extern XLogRecPtr MyLastRecPtr;
-extern uint32 CritSectionCount;
+extern volatile uint32 CritSectionCount;
typedef struct RmgrData
{