mirror of
https://github.com/postgres/postgres.git
synced 2026-06-09 00:32:10 -04: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
a45d896b01
commit
69e676f77d
1 changed files with 4 additions and 1 deletions
5
src/backend/utils/cache/relcache.c
vendored
5
src/backend/utils/cache/relcache.c
vendored
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.190 2003/09/25 06:58:05 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.190.2.1 2008/02/27 17:45:02 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
|
@ -2381,6 +2381,9 @@ RelationCacheInitializePhase2(void)
|
|||
buildinfo.infotype = INFO_RELNAME; \
|
||||
buildinfo.i.info_name = (indname); \
|
||||
ird = RelationBuildDesc(buildinfo, NULL); \
|
||||
if (ird == NULL) \
|
||||
elog(PANIC, "could not open critical system index \"%s\"", \
|
||||
indname); \
|
||||
ird->rd_isnailed = 1; \
|
||||
RelationSetReferenceCount(ird, 1); \
|
||||
} while (0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue