mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-18 18:44:06 +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
caf9e44a86
commit
afe57e993b
5
src/backend/utils/cache/relcache.c
vendored
5
src/backend/utils/cache/relcache.c
vendored
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.215.4.1 2006/01/19 20:28:57 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.215.4.2 2008/02/27 17:44:51 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -2404,6 +2404,9 @@ RelationCacheInitializePhase2(void)
|
|||||||
buildinfo.infotype = INFO_RELNAME; \
|
buildinfo.infotype = INFO_RELNAME; \
|
||||||
buildinfo.i.info_name = (indname); \
|
buildinfo.i.info_name = (indname); \
|
||||||
ird = RelationBuildDesc(buildinfo, NULL); \
|
ird = RelationBuildDesc(buildinfo, NULL); \
|
||||||
|
if (ird == NULL) \
|
||||||
|
elog(PANIC, "could not open critical system index \"%s\"", \
|
||||||
|
indname); \
|
||||||
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