mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-27 08:39:28 +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
00941eea77
commit
1743778d04
7
src/backend/utils/cache/relcache.c
vendored
7
src/backend/utils/cache/relcache.c
vendored
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.266 2008/01/01 19:45:53 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.267 2008/02/27 17:44:19 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -2550,7 +2550,10 @@ RelationCacheInitializePhase2(void)
|
||||
|
||||
#define LOAD_CRIT_INDEX(indexoid) \
|
||||
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_refcnt = 1; \
|
||||
} while (0)
|
||||
|
Loading…
Reference in New Issue
Block a user