mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +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:
@@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.88 2002/02/11 22:41:59 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.89 2002/03/02 21:39:16 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1953,13 +1953,13 @@ gist_dumptree(Relation r, int level, BlockNumber blk, OffsetNumber coff)
|
||||
void
|
||||
gist_redo(XLogRecPtr lsn, XLogRecord *record)
|
||||
{
|
||||
elog(STOP, "gist_redo: unimplemented");
|
||||
elog(PANIC, "gist_redo: unimplemented");
|
||||
}
|
||||
|
||||
void
|
||||
gist_undo(XLogRecPtr lsn, XLogRecord *record)
|
||||
{
|
||||
elog(STOP, "gist_undo: unimplemented");
|
||||
elog(PANIC, "gist_undo: unimplemented");
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.53 2001/10/25 05:49:20 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.54 2002/03/02 21:39:16 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains only the public interface routines.
|
||||
@@ -468,13 +468,13 @@ hashbulkdelete(PG_FUNCTION_ARGS)
|
||||
void
|
||||
hash_redo(XLogRecPtr lsn, XLogRecord *record)
|
||||
{
|
||||
elog(STOP, "hash_redo: unimplemented");
|
||||
elog(PANIC, "hash_redo: unimplemented");
|
||||
}
|
||||
|
||||
void
|
||||
hash_undo(XLogRecPtr lsn, XLogRecord *record)
|
||||
{
|
||||
elog(STOP, "hash_undo: unimplemented");
|
||||
elog(PANIC, "hash_undo: unimplemented");
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.129 2002/01/15 22:14:17 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.130 2002/03/02 21:39:17 momjian Exp $
|
||||
*
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
@@ -142,21 +142,21 @@ heapgettup(Relation relation,
|
||||
#ifdef HEAPDEBUGALL
|
||||
if (ItemPointerIsValid(tid))
|
||||
{
|
||||
elog(DEBUG, "heapgettup(%s, tid=0x%x[%d,%d], dir=%d, ...)",
|
||||
elog(LOG, "heapgettup(%s, tid=0x%x[%d,%d], dir=%d, ...)",
|
||||
RelationGetRelationName(relation), tid, tid->ip_blkid,
|
||||
tid->ip_posid, dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
elog(DEBUG, "heapgettup(%s, tid=0x%x, dir=%d, ...)",
|
||||
elog(LOG, "heapgettup(%s, tid=0x%x, dir=%d, ...)",
|
||||
RelationGetRelationName(relation), tid, dir);
|
||||
}
|
||||
elog(DEBUG, "heapgettup(..., b=0x%x, nkeys=%d, key=0x%x", buffer, nkeys, key);
|
||||
elog(LOG, "heapgettup(..., b=0x%x, nkeys=%d, key=0x%x", buffer, nkeys, key);
|
||||
|
||||
elog(DEBUG, "heapgettup: relation(%c)=`%s', %p",
|
||||
elog(LOG, "heapgettup: relation(%c)=`%s', %p",
|
||||
relation->rd_rel->relkind, RelationGetRelationName(relation),
|
||||
snapshot);
|
||||
#endif /* !defined(HEAPDEBUGALL) */
|
||||
#endif /* !defined(HEAPLOGALL) */
|
||||
|
||||
if (!ItemPointerIsValid(tid))
|
||||
{
|
||||
@@ -745,14 +745,14 @@ heap_endscan(HeapScanDesc scan)
|
||||
|
||||
#ifdef HEAPDEBUGALL
|
||||
#define HEAPDEBUG_1 \
|
||||
elog(DEBUG, "heap_getnext([%s,nkeys=%d],backw=%d) called", \
|
||||
elog(LOG, "heap_getnext([%s,nkeys=%d],backw=%d) called", \
|
||||
RelationGetRelationName(scan->rs_rd), scan->rs_nkeys, backw)
|
||||
|
||||
#define HEAPDEBUG_2 \
|
||||
elog(DEBUG, "heap_getnext returning EOS")
|
||||
elog(LOG, "heap_getnext returning EOS")
|
||||
|
||||
#define HEAPDEBUG_3 \
|
||||
elog(DEBUG, "heap_getnext returning tuple");
|
||||
elog(LOG, "heap_getnext returning tuple");
|
||||
#else
|
||||
#define HEAPDEBUG_1
|
||||
#define HEAPDEBUG_2
|
||||
@@ -1958,11 +1958,11 @@ heap_xlog_clean(bool redo, XLogRecPtr lsn, XLogRecord *record)
|
||||
|
||||
buffer = XLogReadBuffer(false, reln, xlrec->block);
|
||||
if (!BufferIsValid(buffer))
|
||||
elog(STOP, "heap_clean_redo: no block");
|
||||
elog(PANIC, "heap_clean_redo: no block");
|
||||
|
||||
page = (Page) BufferGetPage(buffer);
|
||||
if (PageIsNew((PageHeader) page))
|
||||
elog(STOP, "heap_clean_redo: uninitialized page");
|
||||
elog(PANIC, "heap_clean_redo: uninitialized page");
|
||||
|
||||
if (XLByteLE(lsn, PageGetLSN(page)))
|
||||
{
|
||||
@@ -2015,11 +2015,11 @@ heap_xlog_delete(bool redo, XLogRecPtr lsn, XLogRecord *record)
|
||||
buffer = XLogReadBuffer(false, reln,
|
||||
ItemPointerGetBlockNumber(&(xlrec->target.tid)));
|
||||
if (!BufferIsValid(buffer))
|
||||
elog(STOP, "heap_delete_%sdo: no block", (redo) ? "re" : "un");
|
||||
elog(PANIC, "heap_delete_%sdo: no block", (redo) ? "re" : "un");
|
||||
|
||||
page = (Page) BufferGetPage(buffer);
|
||||
if (PageIsNew((PageHeader) page))
|
||||
elog(STOP, "heap_delete_%sdo: uninitialized page", (redo) ? "re" : "un");
|
||||
elog(PANIC, "heap_delete_%sdo: uninitialized page", (redo) ? "re" : "un");
|
||||
|
||||
if (redo)
|
||||
{
|
||||
@@ -2031,14 +2031,14 @@ heap_xlog_delete(bool redo, XLogRecPtr lsn, XLogRecord *record)
|
||||
}
|
||||
else if (XLByteLT(PageGetLSN(page), lsn)) /* changes are not applied
|
||||
* ?! */
|
||||
elog(STOP, "heap_delete_undo: bad page LSN");
|
||||
elog(PANIC, "heap_delete_undo: bad page LSN");
|
||||
|
||||
offnum = ItemPointerGetOffsetNumber(&(xlrec->target.tid));
|
||||
if (PageGetMaxOffsetNumber(page) >= offnum)
|
||||
lp = PageGetItemId(page, offnum);
|
||||
|
||||
if (PageGetMaxOffsetNumber(page) < offnum || !ItemIdIsUsed(lp))
|
||||
elog(STOP, "heap_delete_%sdo: invalid lp", (redo) ? "re" : "un");
|
||||
elog(PANIC, "heap_delete_%sdo: invalid lp", (redo) ? "re" : "un");
|
||||
|
||||
htup = (HeapTupleHeader) PageGetItem(page, lp);
|
||||
|
||||
@@ -2054,7 +2054,7 @@ heap_xlog_delete(bool redo, XLogRecPtr lsn, XLogRecord *record)
|
||||
return;
|
||||
}
|
||||
|
||||
elog(STOP, "heap_delete_undo: unimplemented");
|
||||
elog(PANIC, "heap_delete_undo: unimplemented");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2080,7 +2080,7 @@ heap_xlog_insert(bool redo, XLogRecPtr lsn, XLogRecord *record)
|
||||
page = (Page) BufferGetPage(buffer);
|
||||
if (PageIsNew((PageHeader) page) &&
|
||||
(!redo || !(record->xl_info & XLOG_HEAP_INIT_PAGE)))
|
||||
elog(STOP, "heap_insert_%sdo: uninitialized page", (redo) ? "re" : "un");
|
||||
elog(PANIC, "heap_insert_%sdo: uninitialized page", (redo) ? "re" : "un");
|
||||
|
||||
if (redo)
|
||||
{
|
||||
@@ -2104,7 +2104,7 @@ heap_xlog_insert(bool redo, XLogRecPtr lsn, XLogRecord *record)
|
||||
|
||||
offnum = ItemPointerGetOffsetNumber(&(xlrec->target.tid));
|
||||
if (PageGetMaxOffsetNumber(page) + 1 < offnum)
|
||||
elog(STOP, "heap_insert_redo: invalid max offset number");
|
||||
elog(PANIC, "heap_insert_redo: invalid max offset number");
|
||||
|
||||
newlen = record->xl_len - SizeOfHeapInsert - SizeOfHeapHeader;
|
||||
Assert(newlen <= MaxTupleSize);
|
||||
@@ -2128,7 +2128,7 @@ heap_xlog_insert(bool redo, XLogRecPtr lsn, XLogRecord *record)
|
||||
offnum = PageAddItem(page, (Item) htup, newlen, offnum,
|
||||
LP_USED | OverwritePageMode);
|
||||
if (offnum == InvalidOffsetNumber)
|
||||
elog(STOP, "heap_insert_redo: failed to add tuple");
|
||||
elog(PANIC, "heap_insert_redo: failed to add tuple");
|
||||
PageSetLSN(page, lsn);
|
||||
PageSetSUI(page, ThisStartUpID); /* prev sui */
|
||||
UnlockAndWriteBuffer(buffer);
|
||||
@@ -2138,9 +2138,9 @@ heap_xlog_insert(bool redo, XLogRecPtr lsn, XLogRecord *record)
|
||||
/* undo insert */
|
||||
if (XLByteLT(PageGetLSN(page), lsn)) /* changes are not applied
|
||||
* ?! */
|
||||
elog(STOP, "heap_insert_undo: bad page LSN");
|
||||
elog(PANIC, "heap_insert_undo: bad page LSN");
|
||||
|
||||
elog(STOP, "heap_insert_undo: unimplemented");
|
||||
elog(PANIC, "heap_insert_undo: unimplemented");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2171,11 +2171,11 @@ heap_xlog_update(bool redo, XLogRecPtr lsn, XLogRecord *record, bool move)
|
||||
buffer = XLogReadBuffer(false, reln,
|
||||
ItemPointerGetBlockNumber(&(xlrec->target.tid)));
|
||||
if (!BufferIsValid(buffer))
|
||||
elog(STOP, "heap_update_%sdo: no block", (redo) ? "re" : "un");
|
||||
elog(PANIC, "heap_update_%sdo: no block", (redo) ? "re" : "un");
|
||||
|
||||
page = (Page) BufferGetPage(buffer);
|
||||
if (PageIsNew((PageHeader) page))
|
||||
elog(STOP, "heap_update_%sdo: uninitialized old page", (redo) ? "re" : "un");
|
||||
elog(PANIC, "heap_update_%sdo: uninitialized old page", (redo) ? "re" : "un");
|
||||
|
||||
if (redo)
|
||||
{
|
||||
@@ -2189,14 +2189,14 @@ heap_xlog_update(bool redo, XLogRecPtr lsn, XLogRecord *record, bool move)
|
||||
}
|
||||
else if (XLByteLT(PageGetLSN(page), lsn)) /* changes are not applied
|
||||
* ?! */
|
||||
elog(STOP, "heap_update_undo: bad old tuple page LSN");
|
||||
elog(PANIC, "heap_update_undo: bad old tuple page LSN");
|
||||
|
||||
offnum = ItemPointerGetOffsetNumber(&(xlrec->target.tid));
|
||||
if (PageGetMaxOffsetNumber(page) >= offnum)
|
||||
lp = PageGetItemId(page, offnum);
|
||||
|
||||
if (PageGetMaxOffsetNumber(page) < offnum || !ItemIdIsUsed(lp))
|
||||
elog(STOP, "heap_update_%sdo: invalid lp", (redo) ? "re" : "un");
|
||||
elog(PANIC, "heap_update_%sdo: invalid lp", (redo) ? "re" : "un");
|
||||
|
||||
htup = (HeapTupleHeader) PageGetItem(page, lp);
|
||||
|
||||
@@ -2224,7 +2224,7 @@ heap_xlog_update(bool redo, XLogRecPtr lsn, XLogRecord *record, bool move)
|
||||
goto newt;
|
||||
}
|
||||
|
||||
elog(STOP, "heap_update_undo: unimplemented");
|
||||
elog(PANIC, "heap_update_undo: unimplemented");
|
||||
|
||||
/* Deal with new tuple */
|
||||
|
||||
@@ -2245,7 +2245,7 @@ newt:;
|
||||
newsame:;
|
||||
if (PageIsNew((PageHeader) page) &&
|
||||
(!redo || !(record->xl_info & XLOG_HEAP_INIT_PAGE)))
|
||||
elog(STOP, "heap_update_%sdo: uninitialized page", (redo) ? "re" : "un");
|
||||
elog(PANIC, "heap_update_%sdo: uninitialized page", (redo) ? "re" : "un");
|
||||
|
||||
if (redo)
|
||||
{
|
||||
@@ -2269,7 +2269,7 @@ newsame:;
|
||||
|
||||
offnum = ItemPointerGetOffsetNumber(&(xlrec->newtid));
|
||||
if (PageGetMaxOffsetNumber(page) + 1 < offnum)
|
||||
elog(STOP, "heap_update_redo: invalid max offset number");
|
||||
elog(PANIC, "heap_update_redo: invalid max offset number");
|
||||
|
||||
hsize = SizeOfHeapUpdate + SizeOfHeapHeader;
|
||||
if (move)
|
||||
@@ -2315,7 +2315,7 @@ newsame:;
|
||||
offnum = PageAddItem(page, (Item) htup, newlen, offnum,
|
||||
LP_USED | OverwritePageMode);
|
||||
if (offnum == InvalidOffsetNumber)
|
||||
elog(STOP, "heap_update_redo: failed to add tuple");
|
||||
elog(PANIC, "heap_update_redo: failed to add tuple");
|
||||
PageSetLSN(page, lsn);
|
||||
PageSetSUI(page, ThisStartUpID); /* prev sui */
|
||||
UnlockAndWriteBuffer(buffer);
|
||||
@@ -2324,9 +2324,9 @@ newsame:;
|
||||
|
||||
/* undo */
|
||||
if (XLByteLT(PageGetLSN(page), lsn)) /* changes not applied?! */
|
||||
elog(STOP, "heap_update_undo: bad new tuple page LSN");
|
||||
elog(PANIC, "heap_update_undo: bad new tuple page LSN");
|
||||
|
||||
elog(STOP, "heap_update_undo: unimplemented");
|
||||
elog(PANIC, "heap_update_undo: unimplemented");
|
||||
|
||||
}
|
||||
|
||||
@@ -2342,30 +2342,30 @@ _heap_unlock_tuple(void *data)
|
||||
HeapTupleHeader htup;
|
||||
|
||||
if (!RelationIsValid(reln))
|
||||
elog(STOP, "_heap_unlock_tuple: can't open relation");
|
||||
elog(PANIC, "_heap_unlock_tuple: can't open relation");
|
||||
|
||||
buffer = XLogReadBuffer(false, reln,
|
||||
ItemPointerGetBlockNumber(&(xltid->tid)));
|
||||
if (!BufferIsValid(buffer))
|
||||
elog(STOP, "_heap_unlock_tuple: can't read buffer");
|
||||
elog(PANIC, "_heap_unlock_tuple: can't read buffer");
|
||||
|
||||
page = (Page) BufferGetPage(buffer);
|
||||
if (PageIsNew((PageHeader) page))
|
||||
elog(STOP, "_heap_unlock_tuple: uninitialized page");
|
||||
elog(PANIC, "_heap_unlock_tuple: uninitialized page");
|
||||
|
||||
offnum = ItemPointerGetOffsetNumber(&(xltid->tid));
|
||||
if (offnum > PageGetMaxOffsetNumber(page))
|
||||
elog(STOP, "_heap_unlock_tuple: invalid itemid");
|
||||
elog(PANIC, "_heap_unlock_tuple: invalid itemid");
|
||||
lp = PageGetItemId(page, offnum);
|
||||
|
||||
if (!ItemIdIsUsed(lp) || ItemIdDeleted(lp))
|
||||
elog(STOP, "_heap_unlock_tuple: unused/deleted tuple in rollback");
|
||||
elog(PANIC, "_heap_unlock_tuple: unused/deleted tuple in rollback");
|
||||
|
||||
htup = (HeapTupleHeader) PageGetItem(page, lp);
|
||||
|
||||
if (!TransactionIdEquals(htup->t_xmax, GetCurrentTransactionId()) ||
|
||||
htup->t_cmax != GetCurrentCommandId())
|
||||
elog(STOP, "_heap_unlock_tuple: invalid xmax/cmax in rollback");
|
||||
elog(PANIC, "_heap_unlock_tuple: invalid xmax/cmax in rollback");
|
||||
htup->t_infomask &= ~HEAP_XMAX_UNLOGGED;
|
||||
htup->t_infomask |= HEAP_XMAX_INVALID;
|
||||
UnlockAndWriteBuffer(buffer);
|
||||
@@ -2389,7 +2389,7 @@ heap_redo(XLogRecPtr lsn, XLogRecord *record)
|
||||
else if (info == XLOG_HEAP_CLEAN)
|
||||
heap_xlog_clean(true, lsn, record);
|
||||
else
|
||||
elog(STOP, "heap_redo: unknown op code %u", info);
|
||||
elog(PANIC, "heap_redo: unknown op code %u", info);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2409,7 +2409,7 @@ heap_undo(XLogRecPtr lsn, XLogRecord *record)
|
||||
else if (info == XLOG_HEAP_CLEAN)
|
||||
heap_xlog_clean(false, lsn, record);
|
||||
else
|
||||
elog(STOP, "heap_undo: unknown op code %u", info);
|
||||
elog(PANIC, "heap_undo: unknown op code %u", info);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Id: hio.c,v 1.43 2001/10/25 05:49:21 momjian Exp $
|
||||
* $Id: hio.c,v 1.44 2002/03/02 21:39:18 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -50,7 +50,7 @@ RelationPutHeapTuple(Relation relation,
|
||||
tuple->t_len, InvalidOffsetNumber, LP_USED);
|
||||
|
||||
if (offnum == InvalidOffsetNumber)
|
||||
elog(STOP, "RelationPutHeapTuple: failed to add tuple");
|
||||
elog(PANIC, "RelationPutHeapTuple: failed to add tuple");
|
||||
|
||||
/* Update tuple->t_self to the actual position where it was stored */
|
||||
ItemPointerSet(&(tuple->t_self), BufferGetBlockNumber(buffer), offnum);
|
||||
@@ -270,7 +270,7 @@ RelationGetBufferForTuple(Relation relation, Size len,
|
||||
if (len > PageGetFreeSpace(pageHeader))
|
||||
{
|
||||
/* We should not get here given the test at the top */
|
||||
elog(STOP, "Tuple is too big: size %lu", (unsigned long) len);
|
||||
elog(PANIC, "Tuple is too big: size %lu", (unsigned long) len);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.88 2002/01/01 20:32:37 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.89 2002/03/02 21:39:18 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -507,7 +507,7 @@ _bt_insertonpg(Relation rel,
|
||||
/* If root page was splitted */
|
||||
if (stack == (BTStack) NULL)
|
||||
{
|
||||
elog(DEBUG, "btree: concurrent ROOT page split");
|
||||
elog(LOG, "btree: concurrent ROOT page split");
|
||||
|
||||
/*
|
||||
* If root page splitter failed to create new root page
|
||||
@@ -735,7 +735,7 @@ _bt_split(Relation rel, Buffer buf, OffsetNumber firstright,
|
||||
item = (BTItem) PageGetItem(origpage, itemid);
|
||||
if (PageAddItem(rightpage, (Item) item, itemsz, rightoff,
|
||||
LP_USED) == InvalidOffsetNumber)
|
||||
elog(STOP, "btree: failed to add hikey to the right sibling");
|
||||
elog(PANIC, "btree: failed to add hikey to the right sibling");
|
||||
rightoff = OffsetNumberNext(rightoff);
|
||||
}
|
||||
|
||||
@@ -761,7 +761,7 @@ _bt_split(Relation rel, Buffer buf, OffsetNumber firstright,
|
||||
lhikey = item;
|
||||
if (PageAddItem(leftpage, (Item) item, itemsz, leftoff,
|
||||
LP_USED) == InvalidOffsetNumber)
|
||||
elog(STOP, "btree: failed to add hikey to the left sibling");
|
||||
elog(PANIC, "btree: failed to add hikey to the left sibling");
|
||||
leftoff = OffsetNumberNext(leftoff);
|
||||
|
||||
/*
|
||||
@@ -1316,7 +1316,7 @@ _bt_newroot(Relation rel, Buffer lbuf, Buffer rbuf)
|
||||
* the two items will go into positions P_HIKEY and P_FIRSTKEY.
|
||||
*/
|
||||
if (PageAddItem(rootpage, (Item) new_item, itemsz, P_HIKEY, LP_USED) == InvalidOffsetNumber)
|
||||
elog(STOP, "btree: failed to add leftkey to new root page");
|
||||
elog(PANIC, "btree: failed to add leftkey to new root page");
|
||||
pfree(new_item);
|
||||
|
||||
/*
|
||||
@@ -1333,7 +1333,7 @@ _bt_newroot(Relation rel, Buffer lbuf, Buffer rbuf)
|
||||
* insert the right page pointer into the new root page.
|
||||
*/
|
||||
if (PageAddItem(rootpage, (Item) new_item, itemsz, P_FIRSTKEY, LP_USED) == InvalidOffsetNumber)
|
||||
elog(STOP, "btree: failed to add rightkey to new root page");
|
||||
elog(PANIC, "btree: failed to add rightkey to new root page");
|
||||
pfree(new_item);
|
||||
|
||||
metad->btm_root = rootblknum;
|
||||
@@ -2034,7 +2034,7 @@ _bt_pgaddtup(Relation rel,
|
||||
|
||||
if (PageAddItem(page, (Item) btitem, itemsize, itup_off,
|
||||
LP_USED) == InvalidOffsetNumber)
|
||||
elog(STOP, "btree: failed to add item to the %s for %s",
|
||||
elog(PANIC, "btree: failed to add item to the %s for %s",
|
||||
where, RelationGetRelationName(rel));
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.87 2002/01/06 00:37:43 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.88 2002/03/02 21:39:18 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -776,7 +776,7 @@ _bt_restore_page(Page page, char *from, int len)
|
||||
itemsz = MAXALIGN(itemsz);
|
||||
if (PageAddItem(page, (Item) from, itemsz,
|
||||
FirstOffsetNumber, LP_USED) == InvalidOffsetNumber)
|
||||
elog(STOP, "_bt_restore_page: can't add item to page");
|
||||
elog(PANIC, "_bt_restore_page: can't add item to page");
|
||||
from += itemsz;
|
||||
}
|
||||
}
|
||||
@@ -799,10 +799,10 @@ btree_xlog_delete(bool redo, XLogRecPtr lsn, XLogRecord *record)
|
||||
buffer = XLogReadBuffer(false, reln,
|
||||
ItemPointerGetBlockNumber(&(xlrec->target.tid)));
|
||||
if (!BufferIsValid(buffer))
|
||||
elog(STOP, "btree_delete_redo: block unfound");
|
||||
elog(PANIC, "btree_delete_redo: block unfound");
|
||||
page = (Page) BufferGetPage(buffer);
|
||||
if (PageIsNew((PageHeader) page))
|
||||
elog(STOP, "btree_delete_redo: uninitialized page");
|
||||
elog(PANIC, "btree_delete_redo: uninitialized page");
|
||||
|
||||
if (XLByteLE(lsn, PageGetLSN(page)))
|
||||
{
|
||||
@@ -838,10 +838,10 @@ btree_xlog_insert(bool redo, XLogRecPtr lsn, XLogRecord *record)
|
||||
buffer = XLogReadBuffer(false, reln,
|
||||
ItemPointerGetBlockNumber(&(xlrec->target.tid)));
|
||||
if (!BufferIsValid(buffer))
|
||||
elog(STOP, "btree_insert_%sdo: block unfound", (redo) ? "re" : "un");
|
||||
elog(PANIC, "btree_insert_%sdo: block unfound", (redo) ? "re" : "un");
|
||||
page = (Page) BufferGetPage(buffer);
|
||||
if (PageIsNew((PageHeader) page))
|
||||
elog(STOP, "btree_insert_%sdo: uninitialized page", (redo) ? "re" : "un");
|
||||
elog(PANIC, "btree_insert_%sdo: uninitialized page", (redo) ? "re" : "un");
|
||||
pageop = (BTPageOpaque) PageGetSpecialPointer(page);
|
||||
|
||||
if (redo)
|
||||
@@ -855,7 +855,7 @@ btree_xlog_insert(bool redo, XLogRecPtr lsn, XLogRecord *record)
|
||||
record->xl_len - SizeOfBtreeInsert,
|
||||
ItemPointerGetOffsetNumber(&(xlrec->target.tid)),
|
||||
LP_USED) == InvalidOffsetNumber)
|
||||
elog(STOP, "btree_insert_redo: failed to add item");
|
||||
elog(PANIC, "btree_insert_redo: failed to add item");
|
||||
|
||||
PageSetLSN(page, lsn);
|
||||
PageSetSUI(page, ThisStartUpID);
|
||||
@@ -864,7 +864,7 @@ btree_xlog_insert(bool redo, XLogRecPtr lsn, XLogRecord *record)
|
||||
else
|
||||
{
|
||||
if (XLByteLT(PageGetLSN(page), lsn))
|
||||
elog(STOP, "btree_insert_undo: bad page LSN");
|
||||
elog(PANIC, "btree_insert_undo: bad page LSN");
|
||||
|
||||
if (!P_ISLEAF(pageop))
|
||||
{
|
||||
@@ -872,7 +872,7 @@ btree_xlog_insert(bool redo, XLogRecPtr lsn, XLogRecord *record)
|
||||
return;
|
||||
}
|
||||
|
||||
elog(STOP, "btree_insert_undo: unimplemented");
|
||||
elog(PANIC, "btree_insert_undo: unimplemented");
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -899,13 +899,13 @@ btree_xlog_split(bool redo, bool onleft, XLogRecPtr lsn, XLogRecord *record)
|
||||
BlockIdGetBlockNumber(&(xlrec->otherblk));
|
||||
buffer = XLogReadBuffer(false, reln, blkno);
|
||||
if (!BufferIsValid(buffer))
|
||||
elog(STOP, "btree_split_%s: lost left sibling", op);
|
||||
elog(PANIC, "btree_split_%s: lost left sibling", op);
|
||||
|
||||
page = (Page) BufferGetPage(buffer);
|
||||
if (redo)
|
||||
_bt_pageinit(page, BufferGetPageSize(buffer));
|
||||
else if (PageIsNew((PageHeader) page))
|
||||
elog(STOP, "btree_split_undo: uninitialized left sibling");
|
||||
elog(PANIC, "btree_split_undo: uninitialized left sibling");
|
||||
pageop = (BTPageOpaque) PageGetSpecialPointer(page);
|
||||
|
||||
if (redo)
|
||||
@@ -928,8 +928,8 @@ btree_xlog_split(bool redo, bool onleft, XLogRecPtr lsn, XLogRecord *record)
|
||||
/* undo */
|
||||
{
|
||||
if (XLByteLT(PageGetLSN(page), lsn))
|
||||
elog(STOP, "btree_split_undo: bad left sibling LSN");
|
||||
elog(STOP, "btree_split_undo: unimplemented");
|
||||
elog(PANIC, "btree_split_undo: bad left sibling LSN");
|
||||
elog(PANIC, "btree_split_undo: unimplemented");
|
||||
}
|
||||
|
||||
/* Right (new) sibling */
|
||||
@@ -937,13 +937,13 @@ btree_xlog_split(bool redo, bool onleft, XLogRecPtr lsn, XLogRecord *record)
|
||||
ItemPointerGetBlockNumber(&(xlrec->target.tid));
|
||||
buffer = XLogReadBuffer((redo) ? true : false, reln, blkno);
|
||||
if (!BufferIsValid(buffer))
|
||||
elog(STOP, "btree_split_%s: lost right sibling", op);
|
||||
elog(PANIC, "btree_split_%s: lost right sibling", op);
|
||||
|
||||
page = (Page) BufferGetPage(buffer);
|
||||
if (redo)
|
||||
_bt_pageinit(page, BufferGetPageSize(buffer));
|
||||
else if (PageIsNew((PageHeader) page))
|
||||
elog(STOP, "btree_split_undo: uninitialized right sibling");
|
||||
elog(PANIC, "btree_split_undo: uninitialized right sibling");
|
||||
pageop = (BTPageOpaque) PageGetSpecialPointer(page);
|
||||
|
||||
if (redo)
|
||||
@@ -967,8 +967,8 @@ btree_xlog_split(bool redo, bool onleft, XLogRecPtr lsn, XLogRecord *record)
|
||||
/* undo */
|
||||
{
|
||||
if (XLByteLT(PageGetLSN(page), lsn))
|
||||
elog(STOP, "btree_split_undo: bad right sibling LSN");
|
||||
elog(STOP, "btree_split_undo: unimplemented");
|
||||
elog(PANIC, "btree_split_undo: bad right sibling LSN");
|
||||
elog(PANIC, "btree_split_undo: unimplemented");
|
||||
}
|
||||
|
||||
if (!redo || (record->xl_info & XLR_BKP_BLOCK_1))
|
||||
@@ -981,11 +981,11 @@ btree_xlog_split(bool redo, bool onleft, XLogRecPtr lsn, XLogRecord *record)
|
||||
|
||||
buffer = XLogReadBuffer(false, reln, blkno);
|
||||
if (!BufferIsValid(buffer))
|
||||
elog(STOP, "btree_split_redo: lost next right page");
|
||||
elog(PANIC, "btree_split_redo: lost next right page");
|
||||
|
||||
page = (Page) BufferGetPage(buffer);
|
||||
if (PageIsNew((PageHeader) page))
|
||||
elog(STOP, "btree_split_redo: uninitialized next right page");
|
||||
elog(PANIC, "btree_split_redo: uninitialized next right page");
|
||||
|
||||
if (XLByteLE(lsn, PageGetLSN(page)))
|
||||
{
|
||||
@@ -1022,10 +1022,10 @@ btree_xlog_newroot(bool redo, XLogRecPtr lsn, XLogRecord *record)
|
||||
return;
|
||||
buffer = XLogReadBuffer(true, reln, BlockIdGetBlockNumber(&(xlrec->rootblk)));
|
||||
if (!BufferIsValid(buffer))
|
||||
elog(STOP, "btree_newroot_redo: no root page");
|
||||
elog(PANIC, "btree_newroot_redo: no root page");
|
||||
metabuf = XLogReadBuffer(false, reln, BTREE_METAPAGE);
|
||||
if (!BufferIsValid(buffer))
|
||||
elog(STOP, "btree_newroot_redo: no metapage");
|
||||
elog(PANIC, "btree_newroot_redo: no metapage");
|
||||
page = (Page) BufferGetPage(buffer);
|
||||
_bt_pageinit(page, BufferGetPageSize(buffer));
|
||||
pageop = (BTPageOpaque) PageGetSpecialPointer(page);
|
||||
@@ -1079,7 +1079,7 @@ btree_redo(XLogRecPtr lsn, XLogRecord *record)
|
||||
else if (info == XLOG_BTREE_NEWROOT)
|
||||
btree_xlog_newroot(true, lsn, record);
|
||||
else
|
||||
elog(STOP, "btree_redo: unknown op code %u", info);
|
||||
elog(PANIC, "btree_redo: unknown op code %u", info);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1099,7 +1099,7 @@ btree_undo(XLogRecPtr lsn, XLogRecord *record)
|
||||
else if (info == XLOG_BTREE_NEWROOT)
|
||||
btree_xlog_newroot(false, lsn, record);
|
||||
else
|
||||
elog(STOP, "btree_undo: unknown op code %u", info);
|
||||
elog(PANIC, "btree_undo: unknown op code %u", info);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.69 2002/01/15 22:14:17 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.70 2002/03/02 21:39:19 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1345,13 +1345,13 @@ _rtdump(Relation r)
|
||||
void
|
||||
rtree_redo(XLogRecPtr lsn, XLogRecord *record)
|
||||
{
|
||||
elog(STOP, "rtree_redo: unimplemented");
|
||||
elog(PANIC, "rtree_redo: unimplemented");
|
||||
}
|
||||
|
||||
void
|
||||
rtree_undo(XLogRecPtr lsn, XLogRecord *record)
|
||||
{
|
||||
elog(STOP, "rtree_undo: unimplemented");
|
||||
elog(PANIC, "rtree_undo: unimplemented");
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/clog.c,v 1.7 2001/10/28 06:25:42 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/clog.c,v 1.8 2002/03/02 21:39:19 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -544,19 +544,19 @@ CLOGPhysicalReadPage(int pageno, int slotno)
|
||||
if (fd < 0)
|
||||
{
|
||||
if (errno != ENOENT || !InRecovery)
|
||||
elog(STOP, "open of %s failed: %m", path);
|
||||
elog(DEBUG, "clog file %s doesn't exist, reading as zeroes", path);
|
||||
elog(PANIC, "open of %s failed: %m", path);
|
||||
elog(LOG, "clog file %s doesn't exist, reading as zeroes", path);
|
||||
MemSet(ClogCtl->page_buffer[slotno], 0, CLOG_BLCKSZ);
|
||||
return;
|
||||
}
|
||||
|
||||
if (lseek(fd, (off_t) offset, SEEK_SET) < 0)
|
||||
elog(STOP, "lseek of clog file %u, offset %u failed: %m",
|
||||
elog(PANIC, "lseek of clog file %u, offset %u failed: %m",
|
||||
segno, offset);
|
||||
|
||||
errno = 0;
|
||||
if (read(fd, ClogCtl->page_buffer[slotno], CLOG_BLCKSZ) != CLOG_BLCKSZ)
|
||||
elog(STOP, "read of clog file %u, offset %u failed: %m",
|
||||
elog(PANIC, "read of clog file %u, offset %u failed: %m",
|
||||
segno, offset);
|
||||
|
||||
close(fd);
|
||||
@@ -596,15 +596,15 @@ CLOGPhysicalWritePage(int pageno, int slotno)
|
||||
if (fd < 0)
|
||||
{
|
||||
if (errno != ENOENT)
|
||||
elog(STOP, "open of %s failed: %m", path);
|
||||
elog(PANIC, "open of %s failed: %m", path);
|
||||
fd = BasicOpenFile(path, O_RDWR | O_CREAT | O_EXCL | PG_BINARY,
|
||||
S_IRUSR | S_IWUSR);
|
||||
if (fd < 0)
|
||||
elog(STOP, "creation of file %s failed: %m", path);
|
||||
elog(PANIC, "creation of file %s failed: %m", path);
|
||||
}
|
||||
|
||||
if (lseek(fd, (off_t) offset, SEEK_SET) < 0)
|
||||
elog(STOP, "lseek of clog file %u, offset %u failed: %m",
|
||||
elog(PANIC, "lseek of clog file %u, offset %u failed: %m",
|
||||
segno, offset);
|
||||
|
||||
errno = 0;
|
||||
@@ -613,7 +613,7 @@ CLOGPhysicalWritePage(int pageno, int slotno)
|
||||
/* if write didn't set errno, assume problem is no disk space */
|
||||
if (errno == 0)
|
||||
errno = ENOSPC;
|
||||
elog(STOP, "write of clog file %u, offset %u failed: %m",
|
||||
elog(PANIC, "write of clog file %u, offset %u failed: %m",
|
||||
segno, offset);
|
||||
}
|
||||
|
||||
@@ -887,7 +887,7 @@ ScanCLOGDirectory(int cutoffPage, bool doDeletions)
|
||||
|
||||
cldir = opendir(ClogDir);
|
||||
if (cldir == NULL)
|
||||
elog(STOP, "could not open transaction-commit log directory (%s): %m",
|
||||
elog(PANIC, "could not open transaction-commit log directory (%s): %m",
|
||||
ClogDir);
|
||||
|
||||
errno = 0;
|
||||
@@ -912,7 +912,7 @@ ScanCLOGDirectory(int cutoffPage, bool doDeletions)
|
||||
errno = 0;
|
||||
}
|
||||
if (errno)
|
||||
elog(STOP, "could not read transaction-commit log directory (%s): %m",
|
||||
elog(PANIC, "could not read transaction-commit log directory (%s): %m",
|
||||
ClogDir);
|
||||
closedir(cldir);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.115 2001/11/01 06:17:01 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.116 2002/03/02 21:39:19 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Transaction aborts can now occur two ways:
|
||||
@@ -1606,7 +1606,7 @@ xact_redo(XLogRecPtr lsn, XLogRecord *record)
|
||||
/* SHOULD REMOVE FILES OF ALL FAILED-TO-BE-CREATED RELATIONS */
|
||||
}
|
||||
else
|
||||
elog(STOP, "xact_redo: unknown op code %u", info);
|
||||
elog(PANIC, "xact_redo: unknown op code %u", info);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1615,9 +1615,9 @@ xact_undo(XLogRecPtr lsn, XLogRecord *record)
|
||||
uint8 info = record->xl_info & ~XLR_INFO_MASK;
|
||||
|
||||
if (info == XLOG_XACT_COMMIT) /* shouldn't be called by XLOG */
|
||||
elog(STOP, "xact_undo: can't undo committed xaction");
|
||||
elog(PANIC, "xact_undo: can't undo committed xaction");
|
||||
else if (info != XLOG_XACT_ABORT)
|
||||
elog(STOP, "xact_redo: unknown op code %u", info);
|
||||
elog(PANIC, "xact_redo: unknown op code %u", info);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1652,7 +1652,7 @@ void
|
||||
{
|
||||
#ifdef XLOG_II
|
||||
if (_RollbackFunc != NULL)
|
||||
elog(STOP, "XactPushRollback: already installed");
|
||||
elog(PANIC, "XactPushRollback: already installed");
|
||||
#endif
|
||||
|
||||
_RollbackFunc = func;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.87 2002/02/18 05:44:45 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.88 2002/03/02 21:39:20 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -489,7 +489,7 @@ XLogInsert(RmgrId rmid, uint8 info, XLogRecData *rdata)
|
||||
if (info & XLR_INFO_MASK)
|
||||
{
|
||||
if ((info & XLR_INFO_MASK) != XLOG_NO_TRAN)
|
||||
elog(STOP, "XLogInsert: invalid info mask %02X",
|
||||
elog(PANIC, "XLogInsert: invalid info mask %02X",
|
||||
(info & XLR_INFO_MASK));
|
||||
no_tran = true;
|
||||
info &= ~XLR_INFO_MASK;
|
||||
@@ -594,7 +594,7 @@ begin:;
|
||||
}
|
||||
}
|
||||
if (i >= XLR_MAX_BKP_BLOCKS)
|
||||
elog(STOP, "XLogInsert: can backup %d blocks at most",
|
||||
elog(PANIC, "XLogInsert: can backup %d blocks at most",
|
||||
XLR_MAX_BKP_BLOCKS);
|
||||
}
|
||||
/* Break out of loop when rdt points to last list item */
|
||||
@@ -612,7 +612,7 @@ begin:;
|
||||
* also remove the check for xl_len == 0 in ReadRecord, below.
|
||||
*/
|
||||
if (len == 0 || len > MAXLOGRECSZ)
|
||||
elog(STOP, "XLogInsert: invalid record length %u", len);
|
||||
elog(PANIC, "XLogInsert: invalid record length %u", len);
|
||||
|
||||
START_CRIT_SECTION();
|
||||
|
||||
@@ -769,7 +769,7 @@ begin:;
|
||||
strcat(buf, " - ");
|
||||
RmgrTable[record->xl_rmid].rm_desc(buf, record->xl_info, rdata->data);
|
||||
}
|
||||
elog(DEBUG, "%s", buf);
|
||||
elog(LOG, "%s", buf);
|
||||
}
|
||||
|
||||
/* Record begin of record in appropriate places */
|
||||
@@ -1010,7 +1010,7 @@ XLogWrite(XLogwrtRqst WriteRqst)
|
||||
* AdvanceXLInsertBuffer.
|
||||
*/
|
||||
if (!XLByteLT(LogwrtResult.Write, XLogCtl->xlblocks[Write->curridx]))
|
||||
elog(STOP, "XLogWrite: write request %X/%X is past end of log %X/%X",
|
||||
elog(PANIC, "XLogWrite: write request %X/%X is past end of log %X/%X",
|
||||
LogwrtResult.Write.xlogid, LogwrtResult.Write.xrecoff,
|
||||
XLogCtl->xlblocks[Write->curridx].xlogid,
|
||||
XLogCtl->xlblocks[Write->curridx].xrecoff);
|
||||
@@ -1027,7 +1027,7 @@ XLogWrite(XLogwrtRqst WriteRqst)
|
||||
if (openLogFile >= 0)
|
||||
{
|
||||
if (close(openLogFile) != 0)
|
||||
elog(STOP, "close of log file %u, segment %u failed: %m",
|
||||
elog(PANIC, "close of log file %u, segment %u failed: %m",
|
||||
openLogId, openLogSeg);
|
||||
openLogFile = -1;
|
||||
}
|
||||
@@ -1066,7 +1066,7 @@ XLogWrite(XLogwrtRqst WriteRqst)
|
||||
(uint32) CheckPointSegments))
|
||||
{
|
||||
if (XLOG_DEBUG)
|
||||
elog(DEBUG, "XLogWrite: time for a checkpoint, signaling postmaster");
|
||||
elog(LOG, "XLogWrite: time for a checkpoint, signaling postmaster");
|
||||
SendPostmasterSignal(PMSIGNAL_DO_CHECKPOINT);
|
||||
}
|
||||
}
|
||||
@@ -1085,7 +1085,7 @@ XLogWrite(XLogwrtRqst WriteRqst)
|
||||
{
|
||||
openLogOff = (LogwrtResult.Write.xrecoff - BLCKSZ) % XLogSegSize;
|
||||
if (lseek(openLogFile, (off_t) openLogOff, SEEK_SET) < 0)
|
||||
elog(STOP, "lseek of log file %u, segment %u, offset %u failed: %m",
|
||||
elog(PANIC, "lseek of log file %u, segment %u, offset %u failed: %m",
|
||||
openLogId, openLogSeg, openLogOff);
|
||||
}
|
||||
|
||||
@@ -1097,7 +1097,7 @@ XLogWrite(XLogwrtRqst WriteRqst)
|
||||
/* if write didn't set errno, assume problem is no disk space */
|
||||
if (errno == 0)
|
||||
errno = ENOSPC;
|
||||
elog(STOP, "write of log file %u, segment %u, offset %u failed: %m",
|
||||
elog(PANIC, "write of log file %u, segment %u, offset %u failed: %m",
|
||||
openLogId, openLogSeg, openLogOff);
|
||||
}
|
||||
openLogOff += BLCKSZ;
|
||||
@@ -1141,7 +1141,7 @@ XLogWrite(XLogwrtRqst WriteRqst)
|
||||
!XLByteInPrevSeg(LogwrtResult.Write, openLogId, openLogSeg))
|
||||
{
|
||||
if (close(openLogFile) != 0)
|
||||
elog(STOP, "close of log file %u, segment %u failed: %m",
|
||||
elog(PANIC, "close of log file %u, segment %u failed: %m",
|
||||
openLogId, openLogSeg);
|
||||
openLogFile = -1;
|
||||
}
|
||||
@@ -1193,7 +1193,7 @@ XLogFlush(XLogRecPtr record)
|
||||
|
||||
if (XLOG_DEBUG)
|
||||
{
|
||||
elog(DEBUG, "XLogFlush%s%s: request %X/%X; write %X/%X; flush %X/%X\n",
|
||||
elog(LOG, "XLogFlush%s%s: request %X/%X; write %X/%X; flush %X/%X\n",
|
||||
(IsBootstrapProcessingMode()) ? "(bootstrap)" : "",
|
||||
(InRedo) ? "(redo)" : "",
|
||||
record.xlogid, record.xrecoff,
|
||||
@@ -1273,7 +1273,7 @@ XLogFlush(XLogRecPtr record)
|
||||
* problem; most likely, the requested flush point is past end of XLOG.
|
||||
* This has been seen to occur when a disk page has a corrupted LSN.
|
||||
*
|
||||
* Formerly we treated this as a STOP condition, but that hurts the
|
||||
* Formerly we treated this as a PANIC condition, but that hurts the
|
||||
* system's robustness rather than helping it: we do not want to take
|
||||
* down the whole system due to corruption on one data page. In
|
||||
* particular, if the bad page is encountered again during recovery then
|
||||
@@ -1286,7 +1286,7 @@ XLogFlush(XLogRecPtr record)
|
||||
* The current approach is to ERROR under normal conditions, but only
|
||||
* NOTICE during recovery, so that the system can be brought up even if
|
||||
* there's a corrupt LSN. Note that for calls from xact.c, the ERROR
|
||||
* will be promoted to STOP since xact.c calls this routine inside a
|
||||
* will be promoted to PANIC since xact.c calls this routine inside a
|
||||
* critical section. However, calls from bufmgr.c are not within
|
||||
* critical sections and so we will not force a restart for a bad LSN
|
||||
* on a data page.
|
||||
@@ -1336,7 +1336,7 @@ XLogFileInit(uint32 log, uint32 seg,
|
||||
if (fd < 0)
|
||||
{
|
||||
if (errno != ENOENT)
|
||||
elog(STOP, "open of %s (log file %u, segment %u) failed: %m",
|
||||
elog(PANIC, "open of %s (log file %u, segment %u) failed: %m",
|
||||
path, log, seg);
|
||||
}
|
||||
else
|
||||
@@ -1358,7 +1358,7 @@ XLogFileInit(uint32 log, uint32 seg,
|
||||
fd = BasicOpenFile(tmppath, O_RDWR | O_CREAT | O_EXCL | PG_BINARY,
|
||||
S_IRUSR | S_IWUSR);
|
||||
if (fd < 0)
|
||||
elog(STOP, "creation of file %s failed: %m", tmppath);
|
||||
elog(PANIC, "creation of file %s failed: %m", tmppath);
|
||||
|
||||
/*
|
||||
* Zero-fill the file. We have to do this the hard way to ensure that
|
||||
@@ -1385,12 +1385,12 @@ XLogFileInit(uint32 log, uint32 seg,
|
||||
/* if write didn't set errno, assume problem is no disk space */
|
||||
errno = save_errno ? save_errno : ENOSPC;
|
||||
|
||||
elog(STOP, "ZeroFill failed to write %s: %m", tmppath);
|
||||
elog(PANIC, "ZeroFill failed to write %s: %m", tmppath);
|
||||
}
|
||||
}
|
||||
|
||||
if (pg_fsync(fd) != 0)
|
||||
elog(STOP, "fsync of file %s failed: %m", tmppath);
|
||||
elog(PANIC, "fsync of file %s failed: %m", tmppath);
|
||||
|
||||
close(fd);
|
||||
|
||||
@@ -1417,7 +1417,7 @@ XLogFileInit(uint32 log, uint32 seg,
|
||||
fd = BasicOpenFile(path, O_RDWR | PG_BINARY | XLOG_SYNC_BIT,
|
||||
S_IRUSR | S_IWUSR);
|
||||
if (fd < 0)
|
||||
elog(STOP, "open of %s (log file %u, segment %u) failed: %m",
|
||||
elog(PANIC, "open of %s (log file %u, segment %u) failed: %m",
|
||||
path, log, seg);
|
||||
|
||||
return (fd);
|
||||
@@ -1495,12 +1495,12 @@ InstallXLogFileSegment(uint32 log, uint32 seg, char *tmppath,
|
||||
*/
|
||||
#ifndef __BEOS__
|
||||
if (link(tmppath, path) < 0)
|
||||
elog(STOP, "link from %s to %s (initialization of log file %u, segment %u) failed: %m",
|
||||
elog(PANIC, "link from %s to %s (initialization of log file %u, segment %u) failed: %m",
|
||||
tmppath, path, log, seg);
|
||||
unlink(tmppath);
|
||||
#else
|
||||
if (rename(tmppath, path) < 0)
|
||||
elog(STOP, "rename from %s to %s (initialization of log file %u, segment %u) failed: %m",
|
||||
elog(PANIC, "rename from %s to %s (initialization of log file %u, segment %u) failed: %m",
|
||||
tmppath, path, log, seg);
|
||||
#endif
|
||||
|
||||
@@ -1531,7 +1531,7 @@ XLogFileOpen(uint32 log, uint32 seg, bool econt)
|
||||
path, log, seg);
|
||||
return (fd);
|
||||
}
|
||||
elog(STOP, "open of %s (log file %u, segment %u) failed: %m",
|
||||
elog(PANIC, "open of %s (log file %u, segment %u) failed: %m",
|
||||
path, log, seg);
|
||||
}
|
||||
|
||||
@@ -1592,7 +1592,7 @@ MoveOfflineLogs(uint32 log, uint32 seg, XLogRecPtr endptr)
|
||||
|
||||
xldir = opendir(XLogDir);
|
||||
if (xldir == NULL)
|
||||
elog(STOP, "could not open transaction log directory (%s): %m",
|
||||
elog(PANIC, "could not open transaction log directory (%s): %m",
|
||||
XLogDir);
|
||||
|
||||
sprintf(lastoff, "%08X%08X", log, seg);
|
||||
@@ -1638,7 +1638,7 @@ MoveOfflineLogs(uint32 log, uint32 seg, XLogRecPtr endptr)
|
||||
errno = 0;
|
||||
}
|
||||
if (errno)
|
||||
elog(STOP, "could not read transaction log directory (%s): %m",
|
||||
elog(PANIC, "could not read transaction log directory (%s): %m",
|
||||
XLogDir);
|
||||
closedir(xldir);
|
||||
}
|
||||
@@ -1749,8 +1749,8 @@ RecordIsValid(XLogRecord *record, XLogRecPtr recptr, int emode)
|
||||
* If RecPtr is not NULL, try to read a record at that position. Otherwise
|
||||
* try to read a record just after the last one previously read.
|
||||
*
|
||||
* If no valid record is available, returns NULL, or fails if emode is STOP.
|
||||
* (emode must be either STOP or LOG.)
|
||||
* If no valid record is available, returns NULL, or fails if emode is PANIC.
|
||||
* (emode must be either PANIC or LOG.)
|
||||
*
|
||||
* buffer is a workspace at least _INTL_MAXLOGRECSZ bytes long. It is needed
|
||||
* to reassemble a record that crosses block boundaries. Note that on
|
||||
@@ -1802,7 +1802,7 @@ ReadRecord(XLogRecPtr *RecPtr, int emode, char *buffer)
|
||||
tmpRecPtr.xrecoff += SizeOfXLogPHD;
|
||||
}
|
||||
else if (!XRecOffIsValid(RecPtr->xrecoff))
|
||||
elog(STOP, "ReadRecord: invalid record offset at %X/%X",
|
||||
elog(PANIC, "ReadRecord: invalid record offset at %X/%X",
|
||||
RecPtr->xlogid, RecPtr->xrecoff);
|
||||
|
||||
if (readFile >= 0 && !XLByteInSeg(*RecPtr, readId, readSeg))
|
||||
@@ -2083,11 +2083,11 @@ WriteControlFile(void)
|
||||
#ifdef USE_LOCALE
|
||||
localeptr = setlocale(LC_COLLATE, NULL);
|
||||
if (!localeptr)
|
||||
elog(STOP, "invalid LC_COLLATE setting");
|
||||
elog(PANIC, "invalid LC_COLLATE setting");
|
||||
StrNCpy(ControlFile->lc_collate, localeptr, LOCALE_NAME_BUFLEN);
|
||||
localeptr = setlocale(LC_CTYPE, NULL);
|
||||
if (!localeptr)
|
||||
elog(STOP, "invalid LC_CTYPE setting");
|
||||
elog(PANIC, "invalid LC_CTYPE setting");
|
||||
StrNCpy(ControlFile->lc_ctype, localeptr, LOCALE_NAME_BUFLEN);
|
||||
|
||||
/*
|
||||
@@ -2122,7 +2122,7 @@ WriteControlFile(void)
|
||||
* specific error than "couldn't read pg_control".
|
||||
*/
|
||||
if (sizeof(ControlFileData) > BLCKSZ)
|
||||
elog(STOP, "sizeof(ControlFileData) is larger than BLCKSZ; fix either one");
|
||||
elog(PANIC, "sizeof(ControlFileData) is larger than BLCKSZ; fix either one");
|
||||
|
||||
memset(buffer, 0, BLCKSZ);
|
||||
memcpy(buffer, ControlFile, sizeof(ControlFileData));
|
||||
@@ -2130,7 +2130,7 @@ WriteControlFile(void)
|
||||
fd = BasicOpenFile(ControlFilePath, O_RDWR | O_CREAT | O_EXCL | PG_BINARY,
|
||||
S_IRUSR | S_IWUSR);
|
||||
if (fd < 0)
|
||||
elog(STOP, "WriteControlFile: could not create control file (%s): %m",
|
||||
elog(PANIC, "WriteControlFile: could not create control file (%s): %m",
|
||||
ControlFilePath);
|
||||
|
||||
errno = 0;
|
||||
@@ -2139,11 +2139,11 @@ WriteControlFile(void)
|
||||
/* if write didn't set errno, assume problem is no disk space */
|
||||
if (errno == 0)
|
||||
errno = ENOSPC;
|
||||
elog(STOP, "WriteControlFile: write to control file failed: %m");
|
||||
elog(PANIC, "WriteControlFile: write to control file failed: %m");
|
||||
}
|
||||
|
||||
if (pg_fsync(fd) != 0)
|
||||
elog(STOP, "WriteControlFile: fsync of control file failed: %m");
|
||||
elog(PANIC, "WriteControlFile: fsync of control file failed: %m");
|
||||
|
||||
close(fd);
|
||||
}
|
||||
@@ -2159,10 +2159,10 @@ ReadControlFile(void)
|
||||
*/
|
||||
fd = BasicOpenFile(ControlFilePath, O_RDWR | PG_BINARY, S_IRUSR | S_IWUSR);
|
||||
if (fd < 0)
|
||||
elog(STOP, "could not open control file (%s): %m", ControlFilePath);
|
||||
elog(PANIC, "could not open control file (%s): %m", ControlFilePath);
|
||||
|
||||
if (read(fd, ControlFile, sizeof(ControlFileData)) != sizeof(ControlFileData))
|
||||
elog(STOP, "read from control file failed: %m");
|
||||
elog(PANIC, "read from control file failed: %m");
|
||||
|
||||
close(fd);
|
||||
|
||||
@@ -2173,7 +2173,7 @@ ReadControlFile(void)
|
||||
* more enlightening than complaining about wrong CRC.
|
||||
*/
|
||||
if (ControlFile->pg_control_version != PG_CONTROL_VERSION)
|
||||
elog(STOP,
|
||||
elog(PANIC,
|
||||
"The database cluster was initialized with PG_CONTROL_VERSION %d,\n"
|
||||
"\tbut the server was compiled with PG_CONTROL_VERSION %d.\n"
|
||||
"\tIt looks like you need to initdb.",
|
||||
@@ -2187,7 +2187,7 @@ ReadControlFile(void)
|
||||
FIN_CRC64(crc);
|
||||
|
||||
if (!EQ_CRC64(crc, ControlFile->crc))
|
||||
elog(STOP, "invalid checksum in control file");
|
||||
elog(PANIC, "invalid checksum in control file");
|
||||
|
||||
/*
|
||||
* Do compatibility checking immediately. We do this here for 2
|
||||
@@ -2202,32 +2202,32 @@ ReadControlFile(void)
|
||||
* compatibility items because they can affect sort order of indexes.)
|
||||
*/
|
||||
if (ControlFile->catalog_version_no != CATALOG_VERSION_NO)
|
||||
elog(STOP,
|
||||
elog(PANIC,
|
||||
"The database cluster was initialized with CATALOG_VERSION_NO %d,\n"
|
||||
"\tbut the backend was compiled with CATALOG_VERSION_NO %d.\n"
|
||||
"\tIt looks like you need to initdb.",
|
||||
ControlFile->catalog_version_no, CATALOG_VERSION_NO);
|
||||
if (ControlFile->blcksz != BLCKSZ)
|
||||
elog(STOP,
|
||||
elog(PANIC,
|
||||
"The database cluster was initialized with BLCKSZ %d,\n"
|
||||
"\tbut the backend was compiled with BLCKSZ %d.\n"
|
||||
"\tIt looks like you need to initdb.",
|
||||
ControlFile->blcksz, BLCKSZ);
|
||||
if (ControlFile->relseg_size != RELSEG_SIZE)
|
||||
elog(STOP,
|
||||
elog(PANIC,
|
||||
"The database cluster was initialized with RELSEG_SIZE %d,\n"
|
||||
"\tbut the backend was compiled with RELSEG_SIZE %d.\n"
|
||||
"\tIt looks like you need to initdb.",
|
||||
ControlFile->relseg_size, RELSEG_SIZE);
|
||||
#ifdef USE_LOCALE
|
||||
if (setlocale(LC_COLLATE, ControlFile->lc_collate) == NULL)
|
||||
elog(STOP,
|
||||
elog(PANIC,
|
||||
"The database cluster was initialized with LC_COLLATE '%s',\n"
|
||||
"\twhich is not recognized by setlocale().\n"
|
||||
"\tIt looks like you need to initdb.",
|
||||
ControlFile->lc_collate);
|
||||
if (setlocale(LC_CTYPE, ControlFile->lc_ctype) == NULL)
|
||||
elog(STOP,
|
||||
elog(PANIC,
|
||||
"The database cluster was initialized with LC_CTYPE '%s',\n"
|
||||
"\twhich is not recognized by setlocale().\n"
|
||||
"\tIt looks like you need to initdb.",
|
||||
@@ -2235,7 +2235,7 @@ ReadControlFile(void)
|
||||
#else /* not USE_LOCALE */
|
||||
if (strcmp(ControlFile->lc_collate, "C") != 0 ||
|
||||
strcmp(ControlFile->lc_ctype, "C") != 0)
|
||||
elog(STOP,
|
||||
elog(PANIC,
|
||||
"The database cluster was initialized with LC_COLLATE '%s' and\n"
|
||||
"\tLC_CTYPE '%s', but the server was compiled without locale support.\n"
|
||||
"\tIt looks like you need to initdb or recompile.",
|
||||
@@ -2256,7 +2256,7 @@ UpdateControlFile(void)
|
||||
|
||||
fd = BasicOpenFile(ControlFilePath, O_RDWR | PG_BINARY, S_IRUSR | S_IWUSR);
|
||||
if (fd < 0)
|
||||
elog(STOP, "could not open control file (%s): %m", ControlFilePath);
|
||||
elog(PANIC, "could not open control file (%s): %m", ControlFilePath);
|
||||
|
||||
errno = 0;
|
||||
if (write(fd, ControlFile, sizeof(ControlFileData)) != sizeof(ControlFileData))
|
||||
@@ -2264,11 +2264,11 @@ UpdateControlFile(void)
|
||||
/* if write didn't set errno, assume problem is no disk space */
|
||||
if (errno == 0)
|
||||
errno = ENOSPC;
|
||||
elog(STOP, "write to control file failed: %m");
|
||||
elog(PANIC, "write to control file failed: %m");
|
||||
}
|
||||
|
||||
if (pg_fsync(fd) != 0)
|
||||
elog(STOP, "fsync of control file failed: %m");
|
||||
elog(PANIC, "fsync of control file failed: %m");
|
||||
|
||||
close(fd);
|
||||
}
|
||||
@@ -2408,11 +2408,11 @@ BootStrapXLOG(void)
|
||||
/* if write didn't set errno, assume problem is no disk space */
|
||||
if (errno == 0)
|
||||
errno = ENOSPC;
|
||||
elog(STOP, "BootStrapXLOG failed to write log file: %m");
|
||||
elog(PANIC, "BootStrapXLOG failed to write log file: %m");
|
||||
}
|
||||
|
||||
if (pg_fsync(openLogFile) != 0)
|
||||
elog(STOP, "BootStrapXLOG failed to fsync log file: %m");
|
||||
elog(PANIC, "BootStrapXLOG failed to fsync log file: %m");
|
||||
|
||||
close(openLogFile);
|
||||
openLogFile = -1;
|
||||
@@ -2478,7 +2478,7 @@ StartupXLOG(void)
|
||||
ControlFile->state < DB_SHUTDOWNED ||
|
||||
ControlFile->state > DB_IN_PRODUCTION ||
|
||||
!XRecOffIsValid(ControlFile->checkPoint.xrecoff))
|
||||
elog(STOP, "control file context is broken");
|
||||
elog(PANIC, "control file context is broken");
|
||||
|
||||
if (ControlFile->state == DB_SHUTDOWNED)
|
||||
elog(LOG, "database system was shut down at %s",
|
||||
@@ -2517,7 +2517,7 @@ StartupXLOG(void)
|
||||
InRecovery = true; /* force recovery even if SHUTDOWNED */
|
||||
}
|
||||
else
|
||||
elog(STOP, "unable to locate a valid checkpoint record");
|
||||
elog(PANIC, "unable to locate a valid checkpoint record");
|
||||
}
|
||||
LastRec = RecPtr = checkPointLoc;
|
||||
memcpy(&checkPoint, XLogRecGetData(record), sizeof(CheckPoint));
|
||||
@@ -2530,7 +2530,7 @@ StartupXLOG(void)
|
||||
elog(LOG, "next transaction id: %u; next oid: %u",
|
||||
checkPoint.nextXid, checkPoint.nextOid);
|
||||
if (!TransactionIdIsNormal(checkPoint.nextXid))
|
||||
elog(STOP, "invalid next transaction id");
|
||||
elog(PANIC, "invalid next transaction id");
|
||||
|
||||
ShmemVariableCache->nextXid = checkPoint.nextXid;
|
||||
ShmemVariableCache->nextOid = checkPoint.nextOid;
|
||||
@@ -2541,7 +2541,7 @@ StartupXLOG(void)
|
||||
XLogCtl->RedoRecPtr = checkPoint.redo;
|
||||
|
||||
if (XLByteLT(RecPtr, checkPoint.redo))
|
||||
elog(STOP, "invalid redo in checkpoint record");
|
||||
elog(PANIC, "invalid redo in checkpoint record");
|
||||
if (checkPoint.undo.xrecoff == 0)
|
||||
checkPoint.undo = RecPtr;
|
||||
|
||||
@@ -2549,7 +2549,7 @@ StartupXLOG(void)
|
||||
XLByteLT(checkPoint.redo, RecPtr))
|
||||
{
|
||||
if (wasShutdown)
|
||||
elog(STOP, "invalid redo/undo record in shutdown checkpoint");
|
||||
elog(PANIC, "invalid redo/undo record in shutdown checkpoint");
|
||||
InRecovery = true;
|
||||
}
|
||||
else if (ControlFile->state != DB_SHUTDOWNED)
|
||||
@@ -2568,7 +2568,7 @@ StartupXLOG(void)
|
||||
|
||||
/* Is REDO required ? */
|
||||
if (XLByteLT(checkPoint.redo, RecPtr))
|
||||
record = ReadRecord(&(checkPoint.redo), STOP, buffer);
|
||||
record = ReadRecord(&(checkPoint.redo), PANIC, buffer);
|
||||
else
|
||||
{
|
||||
/* read past CheckPoint record */
|
||||
@@ -2600,7 +2600,7 @@ StartupXLOG(void)
|
||||
strcat(buf, " - ");
|
||||
RmgrTable[record->xl_rmid].rm_desc(buf,
|
||||
record->xl_info, XLogRecGetData(record));
|
||||
elog(DEBUG, "%s", buf);
|
||||
elog(LOG, "%s", buf);
|
||||
}
|
||||
|
||||
if (record->xl_info & XLR_BKP_BLOCK_MASK)
|
||||
@@ -2622,7 +2622,7 @@ StartupXLOG(void)
|
||||
* Init xlog buffer cache using the block containing the last valid
|
||||
* record from the previous incarnation.
|
||||
*/
|
||||
record = ReadRecord(&LastRec, STOP, buffer);
|
||||
record = ReadRecord(&LastRec, PANIC, buffer);
|
||||
EndOfLog = EndRecPtr;
|
||||
XLByteToPrevSeg(EndOfLog, openLogId, openLogSeg);
|
||||
openLogFile = XLogFileOpen(openLogId, openLogSeg, false);
|
||||
@@ -2701,7 +2701,7 @@ StartupXLOG(void)
|
||||
RecPtr.xlogid, RecPtr.xrecoff);
|
||||
do
|
||||
{
|
||||
record = ReadRecord(&RecPtr, STOP, buffer);
|
||||
record = ReadRecord(&RecPtr, PANIC, buffer);
|
||||
if (TransactionIdIsValid(record->xl_xid) &&
|
||||
!TransactionIdDidCommit(record->xl_xid))
|
||||
RmgrTable[record->xl_rmid].rm_undo(EndRecPtr, record);
|
||||
@@ -2995,7 +2995,7 @@ CreateCheckPoint(bool shutdown)
|
||||
checkPoint.undo = GetUndoRecPtr();
|
||||
|
||||
if (shutdown && checkPoint.undo.xrecoff != 0)
|
||||
elog(STOP, "active transaction while database system is shutting down");
|
||||
elog(PANIC, "active transaction while database system is shutting down");
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -3043,7 +3043,7 @@ CreateCheckPoint(bool shutdown)
|
||||
* recptr = end of actual checkpoint record.
|
||||
*/
|
||||
if (shutdown && !XLByteEQ(checkPoint.redo, ProcLastRecPtr))
|
||||
elog(STOP, "concurrent transaction log activity while database system is shutting down");
|
||||
elog(PANIC, "concurrent transaction log activity while database system is shutting down");
|
||||
|
||||
/*
|
||||
* Select point at which we can truncate the log, which we base on the
|
||||
@@ -3297,12 +3297,12 @@ assign_xlog_sync_method(const char *method)
|
||||
if (openLogFile >= 0)
|
||||
{
|
||||
if (pg_fsync(openLogFile) != 0)
|
||||
elog(STOP, "fsync of log file %u, segment %u failed: %m",
|
||||
elog(PANIC, "fsync of log file %u, segment %u failed: %m",
|
||||
openLogId, openLogSeg);
|
||||
if (open_sync_bit != new_sync_bit)
|
||||
{
|
||||
if (close(openLogFile) != 0)
|
||||
elog(STOP, "close of log file %u, segment %u failed: %m",
|
||||
elog(PANIC, "close of log file %u, segment %u failed: %m",
|
||||
openLogId, openLogSeg);
|
||||
openLogFile = -1;
|
||||
}
|
||||
@@ -3323,13 +3323,13 @@ issue_xlog_fsync(void)
|
||||
{
|
||||
case SYNC_METHOD_FSYNC:
|
||||
if (pg_fsync(openLogFile) != 0)
|
||||
elog(STOP, "fsync of log file %u, segment %u failed: %m",
|
||||
elog(PANIC, "fsync of log file %u, segment %u failed: %m",
|
||||
openLogId, openLogSeg);
|
||||
break;
|
||||
#ifdef HAVE_FDATASYNC
|
||||
case SYNC_METHOD_FDATASYNC:
|
||||
if (pg_fdatasync(openLogFile) != 0)
|
||||
elog(STOP, "fdatasync of log file %u, segment %u failed: %m",
|
||||
elog(PANIC, "fdatasync of log file %u, segment %u failed: %m",
|
||||
openLogId, openLogSeg);
|
||||
break;
|
||||
#endif
|
||||
@@ -3337,7 +3337,7 @@ issue_xlog_fsync(void)
|
||||
/* write synced it already */
|
||||
break;
|
||||
default:
|
||||
elog(STOP, "bogus wal_sync_method %d", sync_method);
|
||||
elog(PANIC, "bogus wal_sync_method %d", sync_method);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlogutils.c,v 1.21 2001/10/25 05:49:22 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlogutils.c,v 1.22 2002/03/02 21:39:20 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -249,7 +249,7 @@ _xl_remove_hash_entry(XLogRelDesc *rdesc)
|
||||
hentry = (XLogRelCacheEntry *) hash_search(_xlrelcache,
|
||||
(void *) &(rdesc->reldata.rd_node), HASH_REMOVE, NULL);
|
||||
if (hentry == NULL)
|
||||
elog(STOP, "_xl_remove_hash_entry: file was not found in cache");
|
||||
elog(PANIC, "_xl_remove_hash_entry: file was not found in cache");
|
||||
|
||||
if (rdesc->reldata.rd_fd >= 0)
|
||||
smgrclose(DEFAULT_SMGR, &(rdesc->reldata));
|
||||
@@ -346,10 +346,10 @@ XLogOpenRelation(bool redo, RmgrId rmid, RelFileNode rnode)
|
||||
hash_search(_xlrelcache, (void *) &rnode, HASH_ENTER, &found);
|
||||
|
||||
if (hentry == NULL)
|
||||
elog(STOP, "XLogOpenRelation: out of memory for cache");
|
||||
elog(PANIC, "XLogOpenRelation: out of memory for cache");
|
||||
|
||||
if (found)
|
||||
elog(STOP, "XLogOpenRelation: file found on insert into cache");
|
||||
elog(PANIC, "XLogOpenRelation: file found on insert into cache");
|
||||
|
||||
hentry->rdesc = res;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user