mirror of
https://github.com/postgres/postgres.git
synced 2025-05-17 06:41:24 +03: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
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…
x
Reference in New Issue
Block a user