mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Disable elog(ERROR|FATAL) in signal handlers in
critical sections of code.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.42 2000/11/30 08:46:21 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.43 2000/12/03 10:27:26 vadim Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Postgres btree pages look like ordinary relation pages. The opaque
|
||||
@@ -165,6 +165,7 @@ _bt_getroot(Relation rel, int access)
|
||||
rootpage = BufferGetPage(rootbuf);
|
||||
|
||||
/* NO ELOG(ERROR) till meta is updated */
|
||||
START_CRIT_CODE;
|
||||
|
||||
_bt_pageinit(rootpage, BufferGetPageSize(rootbuf));
|
||||
rootopaque = (BTPageOpaque) PageGetSpecialPointer(rootpage);
|
||||
@@ -186,6 +187,7 @@ _bt_getroot(Relation rel, int access)
|
||||
PageSetLSN(metapg, recptr);
|
||||
PageSetSUI(metapg, ThisStartUpID);
|
||||
}
|
||||
END_CRIT_CODE;
|
||||
|
||||
metad->btm_root = rootblkno;
|
||||
metad->btm_level = 1;
|
||||
@@ -402,6 +404,7 @@ _bt_pagedel(Relation rel, ItemPointer tid)
|
||||
page = BufferGetPage(buf);
|
||||
|
||||
/* XLOG stuff */
|
||||
START_CRIT_CODE;
|
||||
{
|
||||
xl_btree_delete xlrec;
|
||||
XLogRecPtr recptr;
|
||||
@@ -416,6 +419,7 @@ _bt_pagedel(Relation rel, ItemPointer tid)
|
||||
}
|
||||
|
||||
PageIndexTupleDelete(page, offno);
|
||||
END_CRIT_CODE;
|
||||
|
||||
/* write the buffer and release the lock */
|
||||
_bt_wrtbuf(rel, buf);
|
||||
|
||||
Reference in New Issue
Block a user