From 59f237f7302542e5eb5e6683cb78d62ef5279261 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 27 Feb 2008 17:45:02 +0000 Subject: [PATCH] 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. --- src/backend/utils/cache/relcache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 2d51853800..765ec10291 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -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) -- 2.39.5