mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Goodbye ABORT. Hello ERROR for all errors.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.16 1998/01/05 03:32:51 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.17 1998/01/07 21:04:46 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -155,10 +155,10 @@ InitBufferPool(IPCKey key)
|
||||
*/
|
||||
if (sizeof(struct sbufdesc) != PADDED_SBUFDESC_SIZE ||
|
||||
sizeof(struct sbufdesc_unpadded) > PADDED_SBUFDESC_SIZE)
|
||||
elog(ABORT, "Internal error: sbufdesc does not have the proper size, "
|
||||
elog(ERROR, "Internal error: sbufdesc does not have the proper size, "
|
||||
"contact the Postgres developers");
|
||||
if (sizeof(struct sbufdesc_unpadded) <= PADDED_SBUFDESC_SIZE / 2)
|
||||
elog(ABORT, "Internal error: sbufdesc is greatly over-sized, "
|
||||
elog(ERROR, "Internal error: sbufdesc is greatly over-sized, "
|
||||
"contact the Postgres developers");
|
||||
|
||||
Data_Descriptors = NBuffers;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.9 1998/01/05 03:32:52 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.10 1998/01/07 21:04:47 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -87,7 +87,7 @@ BufTableLookup(BufferTag *tagPtr)
|
||||
|
||||
if (!result)
|
||||
{
|
||||
elog(ABORT, "BufTableLookup: BufferLookup table corrupted");
|
||||
elog(ERROR, "BufTableLookup: BufferLookup table corrupted");
|
||||
return (NULL);
|
||||
}
|
||||
if (!found)
|
||||
@@ -122,7 +122,7 @@ BufTableDelete(BufferDesc *buf)
|
||||
|
||||
if (!(result && found))
|
||||
{
|
||||
elog(ABORT, "BufTableDelete: BufferLookup table corrupted");
|
||||
elog(ERROR, "BufTableDelete: BufferLookup table corrupted");
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
@@ -145,14 +145,14 @@ BufTableInsert(BufferDesc *buf)
|
||||
if (!result)
|
||||
{
|
||||
Assert(0);
|
||||
elog(ABORT, "BufTableInsert: BufferLookup table corrupted");
|
||||
elog(ERROR, "BufTableInsert: BufferLookup table corrupted");
|
||||
return (FALSE);
|
||||
}
|
||||
/* found something else in the table ! */
|
||||
if (found)
|
||||
{
|
||||
Assert(0);
|
||||
elog(ABORT, "BufTableInsert: BufferLookup table corrupted");
|
||||
elog(ERROR, "BufTableInsert: BufferLookup table corrupted");
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.30 1998/01/05 03:32:54 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.31 1998/01/07 21:04:49 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -444,7 +444,7 @@ BufferAlloc(Relation reln,
|
||||
|
||||
/*
|
||||
* But it can return buf == NULL if we are in aborting transaction
|
||||
* now and so elog(ABORT,...) in GetFreeBuffer will not abort
|
||||
* now and so elog(ERROR,...) in GetFreeBuffer will not abort
|
||||
* again.
|
||||
*/
|
||||
if (buf == NULL)
|
||||
@@ -834,7 +834,7 @@ FlushBuffer(Buffer buffer, bool release)
|
||||
|
||||
if (status == SM_FAIL)
|
||||
{
|
||||
elog(ABORT, "FlushBuffer: cannot flush block %u of the relation %s",
|
||||
elog(ERROR, "FlushBuffer: cannot flush block %u of the relation %s",
|
||||
bufHdr->tag.blockNum, bufHdr->sb_relname);
|
||||
return (STATUS_ERROR);
|
||||
}
|
||||
@@ -1009,7 +1009,7 @@ BufferSync()
|
||||
UnpinBuffer(bufHdr);
|
||||
if (bufHdr->flags & BM_IO_ERROR)
|
||||
{
|
||||
elog(ABORT, "BufferSync: write error %u for %s",
|
||||
elog(ERROR, "BufferSync: write error %u for %s",
|
||||
bufHdr->tag.blockNum, bufHdr->sb_relname);
|
||||
}
|
||||
if (reln != (Relation) NULL)
|
||||
@@ -1054,7 +1054,7 @@ BufferSync()
|
||||
if (status == SM_FAIL)
|
||||
{
|
||||
bufHdr->flags |= BM_IO_ERROR;
|
||||
elog(ABORT, "BufferSync: cannot write %u for %s",
|
||||
elog(ERROR, "BufferSync: cannot write %u for %s",
|
||||
bufHdr->tag.blockNum, bufHdr->sb_relname);
|
||||
}
|
||||
BufferFlushCount++;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.8 1998/01/05 03:32:56 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.9 1998/01/07 21:04:52 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -189,7 +189,7 @@ GetFreeBuffer()
|
||||
{
|
||||
|
||||
/* queue is empty. All buffers in the buffer pool are pinned. */
|
||||
elog(ABORT, "out of free buffers: time to abort !\n");
|
||||
elog(ERROR, "out of free buffers: time to abort !\n");
|
||||
return (NULL);
|
||||
}
|
||||
buf = &(BufferDescriptors[SharedFreeList->freeNext]);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.15 1998/01/05 03:32:58 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.16 1998/01/07 21:04:54 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -110,7 +110,7 @@ LocalBufferAlloc(Relation reln, BlockNumber blockNum, bool *foundPtr)
|
||||
}
|
||||
}
|
||||
if (bufHdr == NULL)
|
||||
elog(ABORT, "no empty local buffer.");
|
||||
elog(ERROR, "no empty local buffer.");
|
||||
|
||||
/*
|
||||
* this buffer is not referenced but it might still be dirty (the last
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Id: fd.c,v 1.28 1998/01/05 03:33:00 momjian Exp $
|
||||
* $Id: fd.c,v 1.29 1998/01/07 21:04:58 momjian Exp $
|
||||
*
|
||||
* NOTES:
|
||||
*
|
||||
@@ -586,7 +586,7 @@ tryAgain:
|
||||
|
||||
if (fileName == NULL)
|
||||
{
|
||||
elog(ABORT, "fileNameOpenFile: NULL fname");
|
||||
elog(ERROR, "fileNameOpenFile: NULL fname");
|
||||
}
|
||||
vfdP->fileName = malloc(strlen(fileName) + 1);
|
||||
strcpy(vfdP->fileName, fileName);
|
||||
@@ -763,7 +763,7 @@ FileSeek(File file, long offset, int whence)
|
||||
lseek(VfdCache[file].fd, offset, whence);
|
||||
return returnCode;
|
||||
default:
|
||||
elog(ABORT, "FileSeek: invalid whence: %d", whence);
|
||||
elog(ERROR, "FileSeek: invalid whence: %d", whence);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.17 1998/01/05 03:33:04 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.18 1998/01/07 21:05:03 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@@ -89,7 +89,7 @@ PrivateMemoryCreate(IpcMemoryKey memKey,
|
||||
IpcPrivateMem[memid].id = memid;
|
||||
IpcPrivateMem[memid].memptr = malloc(size);
|
||||
if (IpcPrivateMem[memid].memptr == NULL)
|
||||
elog(ABORT, "PrivateMemoryCreate: not enough memory to malloc");
|
||||
elog(ERROR, "PrivateMemoryCreate: not enough memory to malloc");
|
||||
MemSet(IpcPrivateMem[memid].memptr, 0, size); /* XXX PURIFY */
|
||||
|
||||
return (memid++);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.15 1998/01/05 03:33:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.16 1998/01/07 21:05:08 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -418,7 +418,7 @@ ShmemPIDLookup(int pid, SHMEM_OFFSET *locationPtr)
|
||||
{
|
||||
|
||||
SpinRelease(BindingLock);
|
||||
elog(ABORT, "ShmemInitPID: BindingTable corrupted");
|
||||
elog(ERROR, "ShmemInitPID: BindingTable corrupted");
|
||||
return (FALSE);
|
||||
|
||||
}
|
||||
@@ -469,7 +469,7 @@ ShmemPIDDestroy(int pid)
|
||||
if (!result)
|
||||
{
|
||||
|
||||
elog(ABORT, "ShmemPIDDestroy: PID table corrupted");
|
||||
elog(ERROR, "ShmemPIDDestroy: PID table corrupted");
|
||||
return (INVALID_OFFSET);
|
||||
|
||||
}
|
||||
@@ -555,7 +555,7 @@ ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
|
||||
|
||||
SpinRelease(BindingLock);
|
||||
|
||||
elog(ABORT, "ShmemInitStruct: Binding Table corrupted");
|
||||
elog(ERROR, "ShmemInitStruct: Binding Table corrupted");
|
||||
return (NULL);
|
||||
|
||||
}
|
||||
@@ -640,6 +640,6 @@ TransactionIdIsInProgress(TransactionId xid)
|
||||
}
|
||||
|
||||
SpinRelease(BindingLock);
|
||||
elog(ABORT, "TransactionIdIsInProgress: BindingTable corrupted");
|
||||
elog(ERROR, "TransactionIdIsInProgress: BindingTable corrupted");
|
||||
return (false);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.25 1998/01/05 03:33:09 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.26 1998/01/07 21:05:17 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -111,14 +111,14 @@ inv_create(int flags)
|
||||
if (SearchSysCacheTuple(RELNAME, PointerGetDatum(objname),
|
||||
0, 0, 0) != NULL)
|
||||
{
|
||||
elog(ABORT,
|
||||
elog(ERROR,
|
||||
"internal error: %s already exists -- cannot create large obj",
|
||||
objname);
|
||||
}
|
||||
if (SearchSysCacheTuple(RELNAME, PointerGetDatum(indname),
|
||||
0, 0, 0) != NULL)
|
||||
{
|
||||
elog(ABORT,
|
||||
elog(ERROR,
|
||||
"internal error: %s already exists -- cannot create large obj",
|
||||
indname);
|
||||
}
|
||||
@@ -147,7 +147,7 @@ inv_create(int flags)
|
||||
|
||||
if (!RelationIsValid(r))
|
||||
{
|
||||
elog(ABORT, "cannot create large object on %s under inversion",
|
||||
elog(ERROR, "cannot create large object on %s under inversion",
|
||||
smgrout(DEFAULT_SMGR));
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ inv_create(int flags)
|
||||
|
||||
if (!RelationIsValid(indr))
|
||||
{
|
||||
elog(ABORT, "cannot create index for large obj on %s under inversion",
|
||||
elog(ERROR, "cannot create index for large obj on %s under inversion",
|
||||
smgrout(DEFAULT_SMGR));
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.10 1998/01/05 03:33:16 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.11 1998/01/07 21:05:28 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -434,7 +434,7 @@ RelationUnsetLockForRead(Relation relation)
|
||||
*/
|
||||
if (!LockInfoIsValid(linfo))
|
||||
{
|
||||
elog(ABORT,
|
||||
elog(ERROR,
|
||||
"Releasing a lock on %s with invalid lock information",
|
||||
RelationGetRelationName(relation));
|
||||
}
|
||||
@@ -527,7 +527,7 @@ RelationUnsetLockForWrite(Relation relation)
|
||||
|
||||
if (!LockInfoIsValid(linfo))
|
||||
{
|
||||
elog(ABORT,
|
||||
elog(ERROR,
|
||||
"Releasing a lock on %s with invalid lock information",
|
||||
RelationGetRelationName(relation));
|
||||
}
|
||||
@@ -769,7 +769,7 @@ RelationUnsetSingleWLockPage(Relation relation,
|
||||
return;
|
||||
|
||||
if (!LockInfoIsValid(relation->lockInfo))
|
||||
elog(ABORT,
|
||||
elog(ERROR,
|
||||
"Releasing a lock on %s with invalid lock information",
|
||||
RelationGetRelationName(relation));
|
||||
|
||||
@@ -816,7 +816,7 @@ RelationUnsetSingleRLockPage(Relation relation,
|
||||
return;
|
||||
|
||||
if (!LockInfoIsValid(relation->lockInfo))
|
||||
elog(ABORT,
|
||||
elog(ERROR,
|
||||
"Releasing a lock on %s with invalid lock information",
|
||||
RelationGetRelationName(relation));
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.17 1998/01/05 03:33:22 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.18 1998/01/07 21:05:32 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Outside modules can create a lock table and acquire/release
|
||||
@@ -802,7 +802,7 @@ WaitOnLock(LOCKTAB *ltable, LockTableId tableId, LOCK *lock, LOCKT lockt)
|
||||
lock->holders[lockt]--;
|
||||
LOCK_DUMP_AUX("WaitOnLock: aborting on lock", lock, lockt);
|
||||
SpinRelease(ltable->ctl->masterLock);
|
||||
elog(ABORT, "WaitOnLock: error on wakeup - Aborting this transaction");
|
||||
elog(ERROR, "WaitOnLock: error on wakeup - Aborting this transaction");
|
||||
}
|
||||
|
||||
LOCK_DUMP_AUX("WaitOnLock: wakeup on lock", lock, lockt);
|
||||
@@ -887,7 +887,7 @@ LockRelease(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* let the caller print its own error message, too. Do not elog(ABORT).
|
||||
* let the caller print its own error message, too. Do not elog(ERROR).
|
||||
*/
|
||||
if (!lock)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.9 1998/01/05 03:33:25 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.10 1998/01/07 21:05:35 momjian Exp $
|
||||
*
|
||||
* NOTES:
|
||||
* (1) The lock.c module assumes that the caller here is doing
|
||||
@@ -100,14 +100,14 @@ InitMultiLevelLockm()
|
||||
MultiTableId = tableId;
|
||||
if (!(MultiTableId))
|
||||
{
|
||||
elog(ABORT, "InitMultiLockm: couldnt initialize lock table");
|
||||
elog(ERROR, "InitMultiLockm: couldnt initialize lock table");
|
||||
}
|
||||
/* -----------------------
|
||||
* No short term lock table for now. -Jeff 15 July 1991
|
||||
*
|
||||
* ShortTermTableId = LockTabRename(tableId);
|
||||
* if (! (ShortTermTableId)) {
|
||||
* elog(ABORT,"InitMultiLockm: couldnt rename lock table");
|
||||
* elog(ERROR,"InitMultiLockm: couldnt rename lock table");
|
||||
* }
|
||||
* -----------------------
|
||||
*/
|
||||
@@ -237,7 +237,7 @@ MultiAcquire(LockTableId tableId,
|
||||
locks[2] = lockt;
|
||||
break;
|
||||
default:
|
||||
elog(ABORT, "MultiAcquire: bad lock level");
|
||||
elog(ERROR, "MultiAcquire: bad lock level");
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ MultiRelease(LockTableId tableId,
|
||||
locks[2] = lockt;
|
||||
break;
|
||||
default:
|
||||
elog(ABORT, "MultiRelease: bad lockt");
|
||||
elog(ERROR, "MultiRelease: bad lockt");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -435,7 +435,7 @@ MultiRelease(LockTableId tableId,
|
||||
status = LockRelease(tableId, tmpTag, locks[i]);
|
||||
if (!status)
|
||||
{
|
||||
elog(ABORT, "MultiRelease: couldn't release after error");
|
||||
elog(ERROR, "MultiRelease: couldn't release after error");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.24 1998/01/05 03:33:26 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.25 1998/01/07 21:05:36 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -46,7 +46,7 @@
|
||||
* This is so that we can support more backends. (system-wide semaphore
|
||||
* sets run out pretty fast.) -ay 4/95
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.24 1998/01/05 03:33:26 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.25 1998/01/07 21:05:36 momjian Exp $
|
||||
*/
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
@@ -163,13 +163,13 @@ InitProcess(IPCKey key)
|
||||
if (!found)
|
||||
{
|
||||
/* this should not happen. InitProcGlobal() is called before this. */
|
||||
elog(ABORT, "InitProcess: Proc Header uninitialized");
|
||||
elog(ERROR, "InitProcess: Proc Header uninitialized");
|
||||
}
|
||||
|
||||
if (MyProc != NULL)
|
||||
{
|
||||
SpinRelease(ProcStructLock);
|
||||
elog(ABORT, "ProcInit: you already exist");
|
||||
elog(ERROR, "ProcInit: you already exist");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -803,7 +803,7 @@ ProcGetNewSemKeyAndNum(IPCKey *key, int *semNum)
|
||||
}
|
||||
|
||||
/* if we reach here, all the semaphores are in use. */
|
||||
elog(ABORT, "InitProc: cannot allocate a free semaphore");
|
||||
elog(ERROR, "InitProc: cannot allocate a free semaphore");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.12 1998/01/05 03:33:29 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.13 1998/01/07 21:05:40 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -134,7 +134,7 @@ PageAddItem(Page page,
|
||||
if (((*itemId).lp_flags & LP_USED) ||
|
||||
((*itemId).lp_len != 0))
|
||||
{
|
||||
elog(ABORT, "PageAddItem: tried overwrite of used ItemId");
|
||||
elog(ERROR, "PageAddItem: tried overwrite of used ItemId");
|
||||
return (InvalidOffsetNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.25 1998/01/05 03:33:32 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.26 1998/01/07 21:05:44 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -568,7 +568,7 @@ mdnblocks(Relation reln)
|
||||
{
|
||||
v->mdfd_chain = _mdfd_openseg(reln, segno, O_CREAT);
|
||||
if (v->mdfd_chain == (MdfdVec *) NULL)
|
||||
elog(ABORT, "cannot count blocks for %.16s -- open failed",
|
||||
elog(ERROR, "cannot count blocks for %.16s -- open failed",
|
||||
RelationGetRelationName(reln));
|
||||
}
|
||||
|
||||
@@ -808,7 +808,7 @@ _mdfd_getseg(Relation reln, int blkno, int oflag)
|
||||
if (fd < 0)
|
||||
{
|
||||
if ((fd = mdopen(reln)) < 0)
|
||||
elog(ABORT, "cannot open relation %.16s",
|
||||
elog(ERROR, "cannot open relation %.16s",
|
||||
RelationGetRelationName(reln));
|
||||
reln->rd_fd = fd;
|
||||
}
|
||||
@@ -823,7 +823,7 @@ _mdfd_getseg(Relation reln, int blkno, int oflag)
|
||||
v->mdfd_chain = _mdfd_openseg(reln, i, oflag);
|
||||
|
||||
if (v->mdfd_chain == (MdfdVec *) NULL)
|
||||
elog(ABORT, "cannot open segment %d of relation %.16s",
|
||||
elog(ERROR, "cannot open segment %d of relation %.16s",
|
||||
i, RelationGetRelationName(reln));
|
||||
}
|
||||
v = v->mdfd_chain;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.12 1998/01/05 03:33:33 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.13 1998/01/07 21:05:45 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -132,7 +132,7 @@ smgrcreate(int16 which, Relation reln)
|
||||
int fd;
|
||||
|
||||
if ((fd = (*(smgrsw[which].smgr_create)) (reln)) < 0)
|
||||
elog(ABORT, "cannot open %s",
|
||||
elog(ERROR, "cannot open %s",
|
||||
&(reln->rd_rel->relname.data[0]));
|
||||
|
||||
return (fd);
|
||||
@@ -149,7 +149,7 @@ smgrunlink(int16 which, Relation reln)
|
||||
int status;
|
||||
|
||||
if ((status = (*(smgrsw[which].smgr_unlink)) (reln)) == SM_FAIL)
|
||||
elog(ABORT, "cannot unlink %s",
|
||||
elog(ERROR, "cannot unlink %s",
|
||||
&(reln->rd_rel->relname.data[0]));
|
||||
|
||||
return (status);
|
||||
@@ -169,7 +169,7 @@ smgrextend(int16 which, Relation reln, char *buffer)
|
||||
status = (*(smgrsw[which].smgr_extend)) (reln, buffer);
|
||||
|
||||
if (status == SM_FAIL)
|
||||
elog(ABORT, "%s: cannot extend",
|
||||
elog(ERROR, "%s: cannot extend",
|
||||
&(reln->rd_rel->relname.data[0]));
|
||||
|
||||
return (status);
|
||||
@@ -187,7 +187,7 @@ smgropen(int16 which, Relation reln)
|
||||
int fd;
|
||||
|
||||
if ((fd = (*(smgrsw[which].smgr_open)) (reln)) < 0)
|
||||
elog(ABORT, "cannot open %s",
|
||||
elog(ERROR, "cannot open %s",
|
||||
&(reln->rd_rel->relname.data[0]));
|
||||
|
||||
return (fd);
|
||||
@@ -209,7 +209,7 @@ int
|
||||
smgrclose(int16 which, Relation reln)
|
||||
{
|
||||
if ((*(smgrsw[which].smgr_close)) (reln) == SM_FAIL)
|
||||
elog(ABORT, "cannot close %s",
|
||||
elog(ERROR, "cannot close %s",
|
||||
&(reln->rd_rel->relname.data[0]));
|
||||
|
||||
return (SM_SUCCESS);
|
||||
@@ -233,7 +233,7 @@ smgrread(int16 which, Relation reln, BlockNumber blocknum, char *buffer)
|
||||
status = (*(smgrsw[which].smgr_read)) (reln, blocknum, buffer);
|
||||
|
||||
if (status == SM_FAIL)
|
||||
elog(ABORT, "cannot read block %d of %s",
|
||||
elog(ERROR, "cannot read block %d of %s",
|
||||
blocknum, &(reln->rd_rel->relname.data[0]));
|
||||
|
||||
return (status);
|
||||
@@ -255,7 +255,7 @@ smgrwrite(int16 which, Relation reln, BlockNumber blocknum, char *buffer)
|
||||
status = (*(smgrsw[which].smgr_write)) (reln, blocknum, buffer);
|
||||
|
||||
if (status == SM_FAIL)
|
||||
elog(ABORT, "cannot write block %d of %s",
|
||||
elog(ERROR, "cannot write block %d of %s",
|
||||
blocknum, &(reln->rd_rel->relname.data[0]));
|
||||
|
||||
return (status);
|
||||
@@ -272,7 +272,7 @@ smgrflush(int16 which, Relation reln, BlockNumber blocknum, char *buffer)
|
||||
status = (*(smgrsw[which].smgr_flush)) (reln, blocknum, buffer);
|
||||
|
||||
if (status == SM_FAIL)
|
||||
elog(ABORT, "cannot flush block %d of %s to stable store",
|
||||
elog(ERROR, "cannot flush block %d of %s to stable store",
|
||||
blocknum, &(reln->rd_rel->relname.data[0]));
|
||||
|
||||
return (status);
|
||||
@@ -310,7 +310,7 @@ smgrblindwrt(int16 which,
|
||||
blkno, buffer);
|
||||
|
||||
if (status == SM_FAIL)
|
||||
elog(ABORT, "cannot write block %d of %s [%s] blind",
|
||||
elog(ERROR, "cannot write block %d of %s [%s] blind",
|
||||
blkno, relstr, dbstr);
|
||||
|
||||
pfree(dbstr);
|
||||
@@ -332,7 +332,7 @@ smgrnblocks(int16 which, Relation reln)
|
||||
int nblocks;
|
||||
|
||||
if ((nblocks = (*(smgrsw[which].smgr_nblocks)) (reln)) < 0)
|
||||
elog(ABORT, "cannot count blocks for %s",
|
||||
elog(ERROR, "cannot count blocks for %s",
|
||||
&(reln->rd_rel->relname.data[0]));
|
||||
|
||||
return (nblocks);
|
||||
@@ -354,7 +354,7 @@ smgrtruncate(int16 which, Relation reln, int nblocks)
|
||||
if (smgrsw[which].smgr_truncate)
|
||||
{
|
||||
if ((newblks = (*(smgrsw[which].smgr_truncate)) (reln, nblocks)) < 0)
|
||||
elog(ABORT, "cannot truncate %s to %d blocks",
|
||||
elog(ERROR, "cannot truncate %s to %d blocks",
|
||||
&(reln->rd_rel->relname.data[0]), nblocks);
|
||||
}
|
||||
|
||||
@@ -406,7 +406,7 @@ bool
|
||||
smgriswo(int16 smgrno)
|
||||
{
|
||||
if (smgrno < 0 || smgrno >= NSmgr)
|
||||
elog(ABORT, "illegal storage manager number %d", smgrno);
|
||||
elog(ERROR, "illegal storage manager number %d", smgrno);
|
||||
|
||||
return (smgrwo[smgrno]);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgrtype.c,v 1.6 1998/01/05 03:33:35 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgrtype.c,v 1.7 1998/01/07 21:05:47 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -49,7 +49,7 @@ smgrin(char *s)
|
||||
if (strcmp(s, StorageManager[i].smgr_name) == 0)
|
||||
return ((int2) i);
|
||||
}
|
||||
elog(ABORT, "smgrin: illegal storage manager name %s", s);
|
||||
elog(ERROR, "smgrin: illegal storage manager name %s", s);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ smgrout(int2 i)
|
||||
char *s;
|
||||
|
||||
if (i >= NStorageManagers || i < 0)
|
||||
elog(ABORT, "Illegal storage manager id %d", i);
|
||||
elog(ERROR, "Illegal storage manager id %d", i);
|
||||
|
||||
s = (char *) palloc(strlen(StorageManager[i].smgr_name) + 1);
|
||||
strcpy(s, StorageManager[i].smgr_name);
|
||||
|
||||
Reference in New Issue
Block a user