From 47937403676d913c0e740eec6b85113865c6c8ab Mon Sep 17 00:00:00 2001 From: "Vadim B. Mikheev" Date: Wed, 6 Oct 1999 21:58:18 +0000 Subject: XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown. First step in cleaning up backend initialization code. Fix for FATAL: now FATAL is ERROR + exit. --- src/backend/storage/buffer/buf_init.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/backend/storage/buffer/buf_init.c') diff --git a/src/backend/storage/buffer/buf_init.c b/src/backend/storage/buffer/buf_init.c index bfd0561705..3fe2ec8be6 100644 --- a/src/backend/storage/buffer/buf_init.c +++ b/src/backend/storage/buffer/buf_init.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.30 1999/09/24 00:24:29 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.31 1999/10/06 21:58:04 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -230,16 +230,18 @@ InitBufferPool(IPCKey key) #ifndef HAS_TEST_AND_SET { - int status; extern IpcSemaphoreId WaitIOSemId; extern IpcSemaphoreId WaitCLSemId; WaitIOSemId = IpcSemaphoreCreate(IPCKeyGetWaitIOSemaphoreKey(key), - 1, IPCProtection, 0, 1, &status); + 1, IPCProtection, 0, 1); + if (WaitIOSemId < 0) + elog(FATAL, "InitBufferPool: IpcSemaphoreCreate(WaitIOSemId) failed"); WaitCLSemId = IpcSemaphoreCreate(IPCKeyGetWaitCLSemaphoreKey(key), 1, IPCProtection, - IpcSemaphoreDefaultStartValue, - 1, &status); + IpcSemaphoreDefaultStartValue, 1); + if (WaitCLSemId < 0) + elog(FATAL, "InitBufferPool: IpcSemaphoreCreate(WaitCLSemId) failed"); } #endif PrivateRefCount = (long *) calloc(NBuffers, sizeof(long)); -- cgit v1.2.1