1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

Commit to match discussed elog() changes. Only update is that LOG is

now just below FATAL in server_min_messages.  Added more text to
highlight ordering difference between it and client_min_messages.

---------------------------------------------------------------------------

REALLYFATAL => PANIC
STOP => PANIC
New INFO level the prints to client by default
New LOG level the prints to server log by default
Cause VACUUM information to print only to the client
NOTICE => INFO where purely information messages are sent
DEBUG => LOG for purely server status messages
DEBUG removed, kept as backward compatible
DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added
DebugLvl removed in favor of new DEBUG[1-5] symbols
New server_min_messages GUC parameter with values:
        DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC
New client_min_messages GUC parameter with values:
        DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC
Server startup now logged with LOG instead of DEBUG
Remove debug_level GUC parameter
elog() numbers now start at 10
Add test to print error message if older elog() values are passed to elog()
Bootstrap mode now has a -d that requires an argument, like postmaster
This commit is contained in:
Bruce Momjian
2002-03-02 21:39:36 +00:00
parent 8d8aa931ef
commit a033daf566
85 changed files with 1053 additions and 901 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.120 2001/11/10 23:51:14 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.121 2002/03/02 21:39:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -443,7 +443,7 @@ BufferAlloc(Relation reln,
*/
if (buf->flags & BM_JUST_DIRTIED)
{
elog(STOP, "BufferAlloc: content of block %u (%u/%u) changed while flushing",
elog(PANIC, "BufferAlloc: content of block %u (%u/%u) changed while flushing",
buf->tag.blockNum,
buf->tag.rnode.tblNode, buf->tag.rnode.relNode);
}
@@ -804,7 +804,7 @@ BufferSync()
}
if (status == SM_FAIL) /* disk failure ?! */
elog(STOP, "BufferSync: cannot write %u for %u/%u",
elog(PANIC, "BufferSync: cannot write %u for %u/%u",
bufHdr->tag.blockNum,
bufHdr->tag.rnode.tblNode, bufHdr->tag.rnode.relNode);
@@ -1371,7 +1371,7 @@ PrintBufferDescs()
LWLockAcquire(BufMgrLock, LW_EXCLUSIVE);
for (i = 0; i < NBuffers; ++i, ++buf)
{
elog(DEBUG, "[%02d] (freeNext=%d, freePrev=%d, rel=%u/%u, \
elog(LOG, "[%02d] (freeNext=%d, freePrev=%d, rel=%u/%u, \
blockNum=%u, flags=0x%x, refcount=%d %ld)",
i, buf->freeNext, buf->freePrev,
buf->tag.rnode.tblNode, buf->tag.rnode.relNode,
@@ -1566,7 +1566,7 @@ FlushRelationBuffers(Relation rel, BlockNumber firstDelBlock)
(char *) MAKE_PTR(bufHdr->data));
if (status == SM_FAIL) /* disk failure ?! */
elog(STOP, "FlushRelationBuffers: cannot write %u for %u/%u",
elog(PANIC, "FlushRelationBuffers: cannot write %u for %u/%u",
bufHdr->tag.blockNum,
bufHdr->tag.rnode.tblNode,
bufHdr->tag.rnode.relNode);

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.88 2002/02/10 22:56:31 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.89 2002/03/02 21:39:29 momjian Exp $
*
* NOTES:
*
@@ -270,7 +270,7 @@ tryAgain:
{
int save_errno = errno;
DO_DB(elog(DEBUG, "BasicOpenFile: not enough descs, retry, er= %d",
DO_DB(elog(LOG, "BasicOpenFile: not enough descs, retry, er= %d",
errno));
errno = 0;
if (ReleaseLruFile())
@@ -304,7 +304,7 @@ pg_nofile(void)
#else
no_files = (long) max_files_per_process;
#endif
elog(DEBUG, "pg_nofile: sysconf(_SC_OPEN_MAX) failed; using %ld",
elog(LOG, "pg_nofile: sysconf(_SC_OPEN_MAX) failed; using %ld",
no_files);
}
#else /* !HAVE_SYSCONF */
@@ -353,7 +353,7 @@ _dump_lru(void)
sprintf(buf + strlen(buf), "%d ", mru);
}
sprintf(buf + strlen(buf), "LEAST");
elog(DEBUG, buf);
elog(LOG, buf);
}
#endif /* FDDEBUG */
@@ -364,7 +364,7 @@ Delete(File file)
Assert(file != 0);
DO_DB(elog(DEBUG, "Delete %d (%s)",
DO_DB(elog(LOG, "Delete %d (%s)",
file, VfdCache[file].fileName));
DO_DB(_dump_lru());
@@ -383,7 +383,7 @@ LruDelete(File file)
Assert(file != 0);
DO_DB(elog(DEBUG, "LruDelete %d (%s)",
DO_DB(elog(LOG, "LruDelete %d (%s)",
file, VfdCache[file].fileName));
vfdP = &VfdCache[file];
@@ -399,14 +399,14 @@ LruDelete(File file)
if (vfdP->fdstate & FD_DIRTY)
{
if (pg_fsync(vfdP->fd))
elog(DEBUG, "LruDelete: failed to fsync %s: %m",
elog(LOG, "LruDelete: failed to fsync %s: %m",
vfdP->fileName);
vfdP->fdstate &= ~FD_DIRTY;
}
/* close the file */
if (close(vfdP->fd))
elog(DEBUG, "LruDelete: failed to close %s: %m",
elog(LOG, "LruDelete: failed to close %s: %m",
vfdP->fileName);
--nfile;
@@ -420,7 +420,7 @@ Insert(File file)
Assert(file != 0);
DO_DB(elog(DEBUG, "Insert %d (%s)",
DO_DB(elog(LOG, "Insert %d (%s)",
file, VfdCache[file].fileName));
DO_DB(_dump_lru());
@@ -441,7 +441,7 @@ LruInsert(File file)
Assert(file != 0);
DO_DB(elog(DEBUG, "LruInsert %d (%s)",
DO_DB(elog(LOG, "LruInsert %d (%s)",
file, VfdCache[file].fileName));
vfdP = &VfdCache[file];
@@ -463,12 +463,12 @@ LruInsert(File file)
vfdP->fileMode);
if (vfdP->fd < 0)
{
DO_DB(elog(DEBUG, "RE_OPEN FAILED: %d", errno));
DO_DB(elog(LOG, "RE_OPEN FAILED: %d", errno));
return vfdP->fd;
}
else
{
DO_DB(elog(DEBUG, "RE_OPEN SUCCESS"));
DO_DB(elog(LOG, "RE_OPEN SUCCESS"));
++nfile;
}
@@ -494,7 +494,7 @@ LruInsert(File file)
static bool
ReleaseLruFile(void)
{
DO_DB(elog(DEBUG, "ReleaseLruFile. Opened %d", nfile));
DO_DB(elog(LOG, "ReleaseLruFile. Opened %d", nfile));
if (nfile > 0)
{
@@ -515,7 +515,7 @@ AllocateVfd(void)
Index i;
File file;
DO_DB(elog(DEBUG, "AllocateVfd. Size %d", SizeVfdCache));
DO_DB(elog(LOG, "AllocateVfd. Size %d", SizeVfdCache));
if (SizeVfdCache == 0)
{
@@ -587,7 +587,7 @@ FreeVfd(File file)
{
Vfd *vfdP = &VfdCache[file];
DO_DB(elog(DEBUG, "FreeVfd: %d (%s)",
DO_DB(elog(LOG, "FreeVfd: %d (%s)",
file, vfdP->fileName ? vfdP->fileName : ""));
if (vfdP->fileName != NULL)
@@ -637,7 +637,7 @@ FileAccess(File file)
{
int returnValue;
DO_DB(elog(DEBUG, "FileAccess %d (%s)",
DO_DB(elog(LOG, "FileAccess %d (%s)",
file, VfdCache[file].fileName));
/*
@@ -691,7 +691,7 @@ fileNameOpenFile(FileName fileName,
if (fileName == NULL)
elog(ERROR, "fileNameOpenFile: NULL fname");
DO_DB(elog(DEBUG, "fileNameOpenFile: %s %x %o",
DO_DB(elog(LOG, "fileNameOpenFile: %s %x %o",
fileName, fileFlags, fileMode));
file = AllocateVfd();
@@ -711,7 +711,7 @@ fileNameOpenFile(FileName fileName,
return -1;
}
++nfile;
DO_DB(elog(DEBUG, "fileNameOpenFile: success %d",
DO_DB(elog(LOG, "fileNameOpenFile: success %d",
vfdP->fd));
Insert(file);
@@ -830,7 +830,7 @@ FileClose(File file)
Assert(FileIsValid(file));
DO_DB(elog(DEBUG, "FileClose: %d (%s)",
DO_DB(elog(LOG, "FileClose: %d (%s)",
file, VfdCache[file].fileName));
vfdP = &VfdCache[file];
@@ -844,14 +844,14 @@ FileClose(File file)
if (vfdP->fdstate & FD_DIRTY)
{
if (pg_fsync(vfdP->fd))
elog(DEBUG, "FileClose: failed to fsync %s: %m",
elog(LOG, "FileClose: failed to fsync %s: %m",
vfdP->fileName);
vfdP->fdstate &= ~FD_DIRTY;
}
/* close the file */
if (close(vfdP->fd))
elog(DEBUG, "FileClose: failed to close %s: %m",
elog(LOG, "FileClose: failed to close %s: %m",
vfdP->fileName);
--nfile;
@@ -866,7 +866,7 @@ FileClose(File file)
/* reset flag so that die() interrupt won't cause problems */
vfdP->fdstate &= ~FD_TEMPORARY;
if (unlink(vfdP->fileName))
elog(DEBUG, "FileClose: failed to unlink %s: %m",
elog(LOG, "FileClose: failed to unlink %s: %m",
vfdP->fileName);
}
@@ -884,7 +884,7 @@ FileUnlink(File file)
{
Assert(FileIsValid(file));
DO_DB(elog(DEBUG, "FileUnlink: %d (%s)",
DO_DB(elog(LOG, "FileUnlink: %d (%s)",
file, VfdCache[file].fileName));
/* force FileClose to delete it */
@@ -900,7 +900,7 @@ FileRead(File file, char *buffer, int amount)
Assert(FileIsValid(file));
DO_DB(elog(DEBUG, "FileRead: %d (%s) %ld %d %p",
DO_DB(elog(LOG, "FileRead: %d (%s) %ld %d %p",
file, VfdCache[file].fileName,
VfdCache[file].seekPos, amount, buffer));
@@ -921,7 +921,7 @@ FileWrite(File file, char *buffer, int amount)
Assert(FileIsValid(file));
DO_DB(elog(DEBUG, "FileWrite: %d (%s) %ld %d %p",
DO_DB(elog(LOG, "FileWrite: %d (%s) %ld %d %p",
file, VfdCache[file].fileName,
VfdCache[file].seekPos, amount, buffer));
@@ -947,7 +947,7 @@ FileSeek(File file, long offset, int whence)
{
Assert(FileIsValid(file));
DO_DB(elog(DEBUG, "FileSeek: %d (%s) %ld %ld %d",
DO_DB(elog(LOG, "FileSeek: %d (%s) %ld %ld %d",
file, VfdCache[file].fileName,
VfdCache[file].seekPos, offset, whence));
@@ -1005,7 +1005,7 @@ long
FileTell(File file)
{
Assert(FileIsValid(file));
DO_DB(elog(DEBUG, "FileTell %d (%s)",
DO_DB(elog(LOG, "FileTell %d (%s)",
file, VfdCache[file].fileName));
return VfdCache[file].seekPos;
}
@@ -1018,7 +1018,7 @@ FileTruncate(File file, long offset)
Assert(FileIsValid(file));
DO_DB(elog(DEBUG, "FileTruncate %d (%s)",
DO_DB(elog(LOG, "FileTruncate %d (%s)",
file, VfdCache[file].fileName));
FileSync(file);
@@ -1117,7 +1117,7 @@ FileMarkDirty(File file)
{
Assert(FileIsValid(file));
DO_DB(elog(DEBUG, "FileMarkDirty: %d (%s)",
DO_DB(elog(LOG, "FileMarkDirty: %d (%s)",
file, VfdCache[file].fileName));
VfdCache[file].fdstate |= FD_DIRTY;
@@ -1147,7 +1147,7 @@ AllocateFile(char *name, char *mode)
{
FILE *file;
DO_DB(elog(DEBUG, "AllocateFile: Allocated %d", numAllocatedFiles));
DO_DB(elog(LOG, "AllocateFile: Allocated %d", numAllocatedFiles));
if (numAllocatedFiles >= MAX_ALLOCATED_FILES)
elog(ERROR, "AllocateFile: too many private FDs demanded");
@@ -1164,7 +1164,7 @@ TryAgain:
{
int save_errno = errno;
DO_DB(elog(DEBUG, "AllocateFile: not enough descs, retry, er= %d",
DO_DB(elog(LOG, "AllocateFile: not enough descs, retry, er= %d",
errno));
errno = 0;
if (ReleaseLruFile())
@@ -1180,7 +1180,7 @@ FreeFile(FILE *file)
{
int i;
DO_DB(elog(DEBUG, "FreeFile: Allocated %d", numAllocatedFiles));
DO_DB(elog(LOG, "FreeFile: Allocated %d", numAllocatedFiles));
/* Remove file from list of allocated files, if it's present */
for (i = numAllocatedFiles; --i >= 0;)

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.75 2001/11/05 17:46:28 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.76 2002/03/02 21:39:29 momjian Exp $
*
* NOTES
*
@@ -131,8 +131,7 @@ proc_exit(int code)
InterruptHoldoffCount = 1;
CritSectionCount = 0;
if (DebugLvl > 1)
elog(DEBUG, "proc_exit(%d)", code);
elog(DEBUG2, "proc_exit(%d)", code);
/* do our shared memory exits first */
shmem_exit(code);
@@ -150,8 +149,7 @@ proc_exit(int code)
(*on_proc_exit_list[on_proc_exit_index].function) (code,
on_proc_exit_list[on_proc_exit_index].arg);
if (DebugLvl > 1)
elog(DEBUG, "exit(%d)", code);
elog(DEBUG2, "exit(%d)", code);
exit(code);
}
@@ -164,8 +162,7 @@ proc_exit(int code)
void
shmem_exit(int code)
{
if (DebugLvl > 1)
elog(DEBUG, "shmem_exit(%d)", code);
elog(DEBUG2, "shmem_exit(%d)", code);
/*
* call all the registered callbacks.

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.45 2001/11/04 19:55:31 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.46 2002/03/02 21:39:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -65,8 +65,7 @@ CreateSharedMemoryAndSemaphores(bool makePrivate, int maxBackends)
/* might as well round it off to a multiple of a typical page size */
size += 8192 - (size % 8192);
if (DebugLvl > 1)
fprintf(stderr, "invoking IpcMemoryCreate(size=%d)\n", size);
elog(DEBUG2, "invoking IpcMemoryCreate(size=%d)", size);
/*
* Create the shmem segment

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.43 2001/10/25 05:49:42 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.44 2002/03/02 21:39:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -66,7 +66,7 @@ SendSharedInvalidMessage(SharedInvalidationMessage *msg)
insertOK = SIInsertDataEntry(shmInvalBuffer, msg);
LWLockRelease(SInvalLock);
if (!insertOK)
elog(DEBUG, "SendSharedInvalidMessage: SI buffer overflow");
elog(LOG, "SendSharedInvalidMessage: SI buffer overflow");
}
/*
@@ -108,7 +108,7 @@ ReceiveSharedInvalidMessages(
if (getResult < 0)
{
/* got a reset message */
elog(DEBUG, "ReceiveSharedInvalidMessages: cache state reset");
elog(LOG, "ReceiveSharedInvalidMessages: cache state reset");
resetFunction();
}
else

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.43 2001/11/05 17:46:28 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.44 2002/03/02 21:39:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -119,7 +119,7 @@ SIBackendInit(SISeg *segP)
MyBackendId = (stateP - &segP->procState[0]) + 1;
#ifdef INVALIDDEBUG
elog(DEBUG, "SIBackendInit: backend id %d", MyBackendId);
elog(LOG, "SIBackendInit: backend id %d", MyBackendId);
#endif /* INVALIDDEBUG */
/* mark myself active, with all extant messages already read */
@@ -218,8 +218,7 @@ SIInsertDataEntry(SISeg *segP, SharedInvalidationMessage *data)
if (numMsgs == (MAXNUMMESSAGES * 70 / 100) &&
IsUnderPostmaster)
{
if (DebugLvl >= 1)
elog(DEBUG, "SIInsertDataEntry: table is 70%% full, signaling postmaster");
elog(DEBUG1, "SIInsertDataEntry: table is 70%% full, signaling postmaster");
SendPostmasterSignal(PMSIGNAL_WAKEN_CHILDREN);
}

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.104 2001/11/05 17:46:28 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.105 2002/03/02 21:39:29 momjian Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
@@ -107,7 +107,7 @@ inline static void
LOCK_PRINT(const char *where, const LOCK *lock, LOCKMODE type)
{
if (LOCK_DEBUG_ENABLED(lock))
elog(DEBUG,
elog(LOG,
"%s: lock(%lx) tbl(%d) rel(%u) db(%u) obj(%u) grantMask(%x) "
"req(%d,%d,%d,%d,%d,%d,%d)=%d "
"grant(%d,%d,%d,%d,%d,%d,%d)=%d wait(%d) type(%s)",
@@ -133,7 +133,7 @@ HOLDER_PRINT(const char *where, const HOLDER *holderP)
&& (((LOCK *) MAKE_PTR(holderP->tag.lock))->tag.relId >= (Oid) Trace_lock_oidmin))
|| (Trace_lock_table && (((LOCK *) MAKE_PTR(holderP->tag.lock))->tag.relId == Trace_lock_table))
)
elog(DEBUG,
elog(LOG,
"%s: holder(%lx) lock(%lx) tbl(%d) proc(%lx) xid(%u) hold(%d,%d,%d,%d,%d,%d,%d)=%d",
where, MAKE_OFFSET(holderP), holderP->tag.lock,
HOLDER_LOCKMETHOD(*(holderP)),
@@ -461,7 +461,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag,
#ifdef LOCK_DEBUG
if (lockmethod == USER_LOCKMETHOD && Trace_userlocks)
elog(DEBUG, "LockAcquire: user lock [%u] %s",
elog(LOG, "LockAcquire: user lock [%u] %s",
locktag->objId.blkno, lock_mode_names[lockmode]);
#endif
@@ -582,7 +582,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag,
{
if (i >= (int) lockmode)
break; /* safe: we have a lock >= req level */
elog(DEBUG, "Deadlock risk: raising lock level"
elog(LOG, "Deadlock risk: raising lock level"
" from %s to %s on object %u/%u/%u",
lock_mode_names[i], lock_mode_names[lockmode],
lock->tag.relId, lock->tag.dbId, lock->tag.objId.blkno);
@@ -1000,7 +1000,7 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag,
#ifdef LOCK_DEBUG
if (lockmethod == USER_LOCKMETHOD && Trace_userlocks)
elog(DEBUG, "LockRelease: user lock tag [%u] %d", locktag->objId.blkno, lockmode);
elog(LOG, "LockRelease: user lock tag [%u] %d", locktag->objId.blkno, lockmode);
#endif
/* ???????? This must be changed when short term locks will be used */
@@ -1196,7 +1196,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, PROC *proc,
#ifdef LOCK_DEBUG
if (lockmethod == USER_LOCKMETHOD ? Trace_userlocks : Trace_locks)
elog(DEBUG, "LockReleaseAll: lockmethod=%d, pid=%d",
elog(LOG, "LockReleaseAll: lockmethod=%d, pid=%d",
lockmethod, proc->pid);
#endif
@@ -1341,7 +1341,7 @@ next_item:
#ifdef LOCK_DEBUG
if (lockmethod == USER_LOCKMETHOD ? Trace_userlocks : Trace_locks)
elog(DEBUG, "LockReleaseAll: done");
elog(LOG, "LockReleaseAll: done");
#endif
return TRUE;
@@ -1460,7 +1460,7 @@ DumpAllLocks(void)
LOCK_PRINT("DumpAllLocks", lock, 0);
}
else
elog(DEBUG, "DumpAllLocks: holder->tag.lock = NULL");
elog(LOG, "DumpAllLocks: holder->tag.lock = NULL");
}
}

View File

@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lwlock.c,v 1.8 2002/01/07 16:33:00 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lwlock.c,v 1.9 2002/03/02 21:39:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -68,7 +68,7 @@ inline static void
PRINT_LWDEBUG(const char *where, LWLockId lockid, const volatile LWLock *lock)
{
if (Trace_lwlocks)
elog(DEBUG, "%s(%d): excl %d shared %d head %p rOK %d",
elog(LOG, "%s(%d): excl %d shared %d head %p rOK %d",
where, (int) lockid,
(int) lock->exclusive, lock->shared, lock->head,
(int) lock->releaseOK);
@@ -78,8 +78,7 @@ inline static void
LOG_LWDEBUG(const char *where, LWLockId lockid, const char *msg)
{
if (Trace_lwlocks)
elog(DEBUG, "%s(%d): %s",
where, (int) lockid, msg);
elog(LOG, "%s(%d): %s", where, (int) lockid, msg);
}
#else /* not LOCK_DEBUG */

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.117 2001/12/28 18:16:43 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.118 2002/03/02 21:39:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -211,7 +211,7 @@ InitProcess(void)
* we are a backend, we inherit this by fork() from the postmaster).
*/
if (procglobal == NULL)
elog(STOP, "InitProcess: Proc Header uninitialized");
elog(PANIC, "InitProcess: Proc Header uninitialized");
if (MyProc != NULL)
elog(ERROR, "InitProcess: you already exist");
@@ -300,7 +300,7 @@ InitDummyProcess(void)
* inherit this by fork() from the postmaster).
*/
if (ProcGlobal == NULL || DummyProc == NULL)
elog(STOP, "InitDummyProcess: Proc Header uninitialized");
elog(PANIC, "InitDummyProcess: Proc Header uninitialized");
if (MyProc != NULL)
elog(ERROR, "InitDummyProcess: you already exist");

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.89 2001/10/28 06:25:51 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.90 2002/03/02 21:39:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -571,7 +571,7 @@ mdblindwrt(RelFileNode rnode,
if (lseek(fd, seekpos, SEEK_SET) != seekpos)
{
elog(DEBUG, "mdblindwrt: lseek(%ld) failed: %m", seekpos);
elog(LOG, "mdblindwrt: lseek(%ld) failed: %m", seekpos);
close(fd);
return SM_FAIL;
}
@@ -585,13 +585,13 @@ mdblindwrt(RelFileNode rnode,
/* if write didn't set errno, assume problem is no disk space */
if (errno == 0)
errno = ENOSPC;
elog(DEBUG, "mdblindwrt: write() failed: %m");
elog(LOG, "mdblindwrt: write() failed: %m");
status = SM_FAIL;
}
if (close(fd) < 0)
{
elog(DEBUG, "mdblindwrt: close() failed: %m");
elog(LOG, "mdblindwrt: close() failed: %m");
status = SM_FAIL;
}
@@ -1085,7 +1085,7 @@ _mdfd_blind_getseg(RelFileNode rnode, BlockNumber blkno)
/* call fd.c to allow other FDs to be closed if needed */
fd = BasicOpenFile(path, O_RDWR | PG_BINARY, 0600);
if (fd < 0)
elog(DEBUG, "_mdfd_blind_getseg: couldn't open %s: %m", path);
elog(LOG, "_mdfd_blind_getseg: couldn't open %s: %m", path);
pfree(path);

View File

@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.54 2001/10/25 05:49:43 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.55 2002/03/02 21:39:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -582,7 +582,7 @@ smgrsync()
if (smgrsw[i].smgr_sync)
{
if ((*(smgrsw[i].smgr_sync)) () == SM_FAIL)
elog(STOP, "storage sync failed on %s: %m",
elog(PANIC, "storage sync failed on %s: %m",
DatumGetCString(DirectFunctionCall1(smgrout,
Int16GetDatum(i))));
}