From c715fdea267843fd7fae4253aee0ae91e941393c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 28 Nov 2000 23:27:57 +0000 Subject: 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. --- src/backend/access/transam/xlog.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/backend/access/transam/xlog.c') 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; -- cgit v1.2.3