mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
If RelationBuildDesc() fails to open a critical system index, PANIC with
a relevant error message instead of just dumping core. Odd that nobody reported this before Darren Reed.
This commit is contained in:
parent
1558a043ab
commit
c05c8fe5d7
7
src/backend/utils/cache/relcache.c
vendored
7
src/backend/utils/cache/relcache.c
vendored
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.250 2006/11/05 23:40:30 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.250.2.1 2008/02/27 17:44:33 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -2385,7 +2385,10 @@ RelationCacheInitializePhase2(void)
|
|||||||
|
|
||||||
#define LOAD_CRIT_INDEX(indexoid) \
|
#define LOAD_CRIT_INDEX(indexoid) \
|
||||||
do { \
|
do { \
|
||||||
ird = RelationBuildDesc((indexoid), NULL); \
|
ird = RelationBuildDesc(indexoid, NULL); \
|
||||||
|
if (ird == NULL) \
|
||||||
|
elog(PANIC, "could not open critical system index %u", \
|
||||||
|
indexoid); \
|
||||||
ird->rd_isnailed = true; \
|
ird->rd_isnailed = true; \
|
||||||
ird->rd_refcnt = 1; \
|
ird->rd_refcnt = 1; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
Loading…
Reference in New Issue
Block a user