aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-11-28 23:27:57 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-11-28 23:27:57 +0000
commitc715fdea267843fd7fae4253aee0ae91e941393c (patch)
treeb19e41edd57afe461ebc3dae271c8a5d17eba710 /src/backend/access/transam/xlog.c
parent914822713c9a8ce452860fb895ef79ecfd583746 (diff)
downloadpostgresql-c715fdea267843fd7fae4253aee0ae91e941393c.tar.gz
postgresql-c715fdea267843fd7fae4253aee0ae91e941393c.zip
Significant cleanups in SysV IPC handling (shared mem and semaphores).
IPC key assignment will now work correctly even when multiple postmasters are using same logical port number (which is possible given -k switch). There is only one shared-mem segment per postmaster now, not 3. Rip out broken code for non-TAS case in bufmgr and xlog, substitute a complete S_LOCK emulation using semaphores in spin.c. TAS and non-TAS logic is now exactly the same. When deadlock is detected, "Deadlock detected" is now the elog(ERROR) message, rather than a NOTICE that comes out before an unhelpful ERROR.
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index b31a6182ee2..c70dbc7b4fb 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.35 2000/11/27 05:36:12 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.36 2000/11/28 23:27:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -85,12 +85,6 @@ typedef struct XLogCtlWrite
} XLogCtlWrite;
-#ifndef HAS_TEST_AND_SET
-#define TAS(lck) 0
-#define S_UNLOCK(lck)
-#define S_INIT_LOCK(lck)
-#endif
-
typedef struct XLogCtlData
{
XLogCtlInsert Insert;
@@ -102,12 +96,10 @@ typedef struct XLogCtlData
uint32 XLogCacheByte;
uint32 XLogCacheBlck;
StartUpID ThisStartUpID;
-#ifdef HAS_TEST_AND_SET
slock_t insert_lck;
slock_t info_lck;
slock_t lgwr_lck;
slock_t chkp_lck; /* checkpoint lock */
-#endif
} XLogCtlData;
static XLogCtlData *XLogCtl = NULL;