mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
Change elog(WARN) to elog(ERROR) and elog(ABORT).
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.22 1997/12/09 01:40:30 thomas Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.23 1998/01/05 03:29:45 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -123,7 +123,7 @@ _bt_doinsert(Relation rel, BTItem btitem, bool index_is_unique, Relation heapRel
|
||||
htup = heap_fetch(heapRel, true, &(itup->t_tid), NULL);
|
||||
if (htup != (HeapTuple) NULL)
|
||||
{ /* it is a duplicate */
|
||||
elog(WARN, "Cannot insert a duplicate key into a unique index");
|
||||
elog(ABORT, "Cannot insert a duplicate key into a unique index");
|
||||
}
|
||||
/* get next offnum */
|
||||
if (offset < maxoff)
|
||||
@@ -1442,7 +1442,7 @@ _bt_updateitem(Relation rel,
|
||||
* if(IndexTupleDSize(newItem->bti_itup) >
|
||||
* IndexTupleDSize(item->bti_itup)) { elog(NOTICE, "trying to
|
||||
* overwrite a smaller value with a bigger one in _bt_updateitem");
|
||||
* elog(WARN, "this is not good."); }
|
||||
* elog(ABORT, "this is not good."); }
|
||||
*/
|
||||
|
||||
oldIndexTuple = &(item->bti_itup);
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.13 1997/09/18 20:19:49 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.14 1998/01/05 03:29:50 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Postgres btree pages look like ordinary relation pages. The opaque
|
||||
@@ -97,7 +97,7 @@ _bt_metapinit(Relation rel)
|
||||
|
||||
if ((nblocks = RelationGetNumberOfBlocks(rel)) != 0)
|
||||
{
|
||||
elog(WARN, "Cannot initialize non-empty btree %s",
|
||||
elog(ABORT, "Cannot initialize non-empty btree %s",
|
||||
RelationGetRelationName(rel));
|
||||
}
|
||||
|
||||
@@ -146,20 +146,20 @@ _bt_checkmeta(Relation rel)
|
||||
op = (BTPageOpaque) PageGetSpecialPointer(metap);
|
||||
if (!(op->btpo_flags & BTP_META))
|
||||
{
|
||||
elog(WARN, "Invalid metapage for index %s",
|
||||
elog(ABORT, "Invalid metapage for index %s",
|
||||
RelationGetRelationName(rel));
|
||||
}
|
||||
metad = BTPageGetMeta(metap);
|
||||
|
||||
if (metad->btm_magic != BTREE_MAGIC)
|
||||
{
|
||||
elog(WARN, "Index %s is not a btree",
|
||||
elog(ABORT, "Index %s is not a btree",
|
||||
RelationGetRelationName(rel));
|
||||
}
|
||||
|
||||
if (metad->btm_version != BTREE_VERSION)
|
||||
{
|
||||
elog(WARN, "Version mismatch on %s: version %d file, version %d code",
|
||||
elog(ABORT, "Version mismatch on %s: version %d file, version %d code",
|
||||
RelationGetRelationName(rel),
|
||||
metad->btm_version, BTREE_VERSION);
|
||||
}
|
||||
@@ -204,13 +204,13 @@ _bt_getroot(Relation rel, int access)
|
||||
|
||||
if (metad->btm_magic != BTREE_MAGIC)
|
||||
{
|
||||
elog(WARN, "Index %s is not a btree",
|
||||
elog(ABORT, "Index %s is not a btree",
|
||||
RelationGetRelationName(rel));
|
||||
}
|
||||
|
||||
if (metad->btm_version != BTREE_VERSION)
|
||||
{
|
||||
elog(WARN, "Version mismatch on %s: version %d file, version %d code",
|
||||
elog(ABORT, "Version mismatch on %s: version %d file, version %d code",
|
||||
RelationGetRelationName(rel),
|
||||
metad->btm_version, BTREE_VERSION);
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.10 1997/09/08 20:54:24 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.11 1998/01/05 03:29:52 momjian Exp $
|
||||
*
|
||||
*
|
||||
* NOTES
|
||||
@@ -77,7 +77,7 @@ _bt_dropscan(IndexScanDesc scan)
|
||||
}
|
||||
|
||||
if (chk == (BTScanList) NULL)
|
||||
elog(WARN, "btree scan list trashed; can't find 0x%lx", scan);
|
||||
elog(ABORT, "btree scan list trashed; can't find 0x%lx", scan);
|
||||
|
||||
if (last == (BTScanList) NULL)
|
||||
BTScans = chk->btsl_next;
|
||||
@@ -154,7 +154,7 @@ _bt_scandel(IndexScanDesc scan, int op, BlockNumber blkno, OffsetNumber offno)
|
||||
_bt_step(scan, &buf, BackwardScanDirection);
|
||||
break;
|
||||
default:
|
||||
elog(WARN, "_bt_scandel: bad operation '%d'", op);
|
||||
elog(ABORT, "_bt_scandel: bad operation '%d'", op);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
so->btso_curbuf = buf;
|
||||
@@ -179,7 +179,7 @@ _bt_scandel(IndexScanDesc scan, int op, BlockNumber blkno, OffsetNumber offno)
|
||||
_bt_step(scan, &buf, BackwardScanDirection);
|
||||
break;
|
||||
default:
|
||||
elog(WARN, "_bt_scandel: bad operation '%d'", op);
|
||||
elog(ABORT, "_bt_scandel: bad operation '%d'", op);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
so->btso_mrkbuf = buf;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.27 1997/10/22 19:02:52 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.28 1998/01/05 03:29:53 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -617,7 +617,7 @@ _bt_compare(Relation rel,
|
||||
*/
|
||||
if (!P_RIGHTMOST(opaque))
|
||||
{
|
||||
elog(WARN, "_bt_compare: invalid comparison to high key");
|
||||
elog(ABORT, "_bt_compare: invalid comparison to high key");
|
||||
}
|
||||
|
||||
#if 0
|
||||
@@ -839,7 +839,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
|
||||
/* _bt_orderkeys disallows it, but it's place to add some code latter */
|
||||
if (so->keyData[0].sk_flags & SK_ISNULL)
|
||||
{
|
||||
elog(WARN, "_bt_first: btree doesn't support is(not)null, yet");
|
||||
elog(ABORT, "_bt_first: btree doesn't support is(not)null, yet");
|
||||
return ((RetrieveIndexResult) NULL);
|
||||
}
|
||||
proc = index_getprocid(rel, 1, BTORDER_PROC);
|
||||
@@ -1331,7 +1331,7 @@ _bt_twostep(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
|
||||
* us up less often since they're only done by the vacuum daemon.
|
||||
*/
|
||||
|
||||
elog(WARN, "btree synchronization error: concurrent update botched scan");
|
||||
elog(ABORT, "btree synchronization error: concurrent update botched scan");
|
||||
|
||||
return (false);
|
||||
}
|
||||
@@ -1416,7 +1416,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
|
||||
if (ScanDirectionIsForward(dir))
|
||||
{
|
||||
if (!P_LEFTMOST(opaque))/* non-leftmost page ? */
|
||||
elog(WARN, "_bt_endpoint: leftmost page (%u) has not leftmost flag", blkno);
|
||||
elog(ABORT, "_bt_endpoint: leftmost page (%u) has not leftmost flag", blkno);
|
||||
start = P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY;
|
||||
|
||||
/*
|
||||
@@ -1440,7 +1440,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
|
||||
if (PageIsEmpty(page))
|
||||
{
|
||||
if (start != P_HIKEY) /* non-rightmost page */
|
||||
elog(WARN, "_bt_endpoint: non-rightmost page (%u) is empty", blkno);
|
||||
elog(ABORT, "_bt_endpoint: non-rightmost page (%u) is empty", blkno);
|
||||
|
||||
/*
|
||||
* It's left- & right- most page - root page, - and it's
|
||||
@@ -1512,7 +1512,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
|
||||
}
|
||||
else
|
||||
{
|
||||
elog(WARN, "Illegal scan direction %d", dir);
|
||||
elog(ABORT, "Illegal scan direction %d", dir);
|
||||
}
|
||||
|
||||
btitem = (BTItem) PageGetItem(page, PageGetItemId(page, start));
|
||||
|
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Id: nbtsort.c,v 1.24 1997/09/18 20:19:53 momjian Exp $
|
||||
* $Id: nbtsort.c,v 1.25 1998/01/05 03:29:55 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@@ -212,7 +212,7 @@ _bt_isortcmp(BTSortKey *k1, BTSortKey *k2)
|
||||
if (_bt_inspool->isunique && !equal_isnull)
|
||||
{
|
||||
_bt_spooldestroy((void *) _bt_inspool);
|
||||
elog(WARN, "Cannot create unique index. Table contains non-unique values");
|
||||
elog(ABORT, "Cannot create unique index. Table contains non-unique values");
|
||||
}
|
||||
return (0); /* 1 = 2 */
|
||||
}
|
||||
@@ -333,7 +333,7 @@ _bt_pqadd(BTPriQueue *q, BTPriQueueElem *e)
|
||||
|
||||
if (q->btpq_nelem >= MAXELEM)
|
||||
{
|
||||
elog(WARN, "_bt_pqadd: queue overflow");
|
||||
elog(ABORT, "_bt_pqadd: queue overflow");
|
||||
}
|
||||
|
||||
child = q->btpq_nelem++;
|
||||
@@ -426,7 +426,7 @@ _bt_tapecreate(char *fname)
|
||||
|
||||
if (tape == (BTTapeBlock *) NULL)
|
||||
{
|
||||
elog(WARN, "_bt_tapecreate: out of memory");
|
||||
elog(ABORT, "_bt_tapecreate: out of memory");
|
||||
}
|
||||
|
||||
tape->bttb_magic = BTTAPEMAGIC;
|
||||
@@ -563,7 +563,7 @@ _bt_spoolinit(Relation index, int ntapes, bool isunique)
|
||||
|
||||
if (btspool == (BTSpool *) NULL || fname == (char *) NULL)
|
||||
{
|
||||
elog(WARN, "_bt_spoolinit: out of memory");
|
||||
elog(ABORT, "_bt_spoolinit: out of memory");
|
||||
}
|
||||
MemSet((char *) btspool, 0, sizeof(BTSpool));
|
||||
btspool->bts_ntapes = ntapes;
|
||||
@@ -577,7 +577,7 @@ _bt_spoolinit(Relation index, int ntapes, bool isunique)
|
||||
if (btspool->bts_itape == (BTTapeBlock **) NULL ||
|
||||
btspool->bts_otape == (BTTapeBlock **) NULL)
|
||||
{
|
||||
elog(WARN, "_bt_spoolinit: out of memory");
|
||||
elog(ABORT, "_bt_spoolinit: out of memory");
|
||||
}
|
||||
|
||||
for (i = 0; i < ntapes; ++i)
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.15 1997/09/18 20:19:55 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.16 1998/01/05 03:29:56 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -119,7 +119,7 @@ _bt_orderkeys(Relation relation, BTScanOpaque so)
|
||||
|
||||
cur = &key[0];
|
||||
if (cur->sk_attno != 1)
|
||||
elog(WARN, "_bt_orderkeys: key(s) for attribute 1 missed");
|
||||
elog(ABORT, "_bt_orderkeys: key(s) for attribute 1 missed");
|
||||
|
||||
if (numberOfKeys == 1)
|
||||
{
|
||||
@@ -159,7 +159,7 @@ _bt_orderkeys(Relation relation, BTScanOpaque so)
|
||||
{
|
||||
if (cur->sk_attno != attno + 1 && i < numberOfKeys)
|
||||
{
|
||||
elog(WARN, "_bt_orderkeys: key(s) for attribute %d missed", attno + 1);
|
||||
elog(ABORT, "_bt_orderkeys: key(s) for attribute %d missed", attno + 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -296,7 +296,7 @@ _bt_formitem(IndexTuple itup)
|
||||
/*
|
||||
* see comments in btbuild
|
||||
*
|
||||
* if (itup->t_info & INDEX_NULL_MASK) elog(WARN, "btree indices cannot
|
||||
* if (itup->t_info & INDEX_NULL_MASK) elog(ABORT, "btree indices cannot
|
||||
* include null keys");
|
||||
*/
|
||||
|
||||
|
Reference in New Issue
Block a user