From: Tom Lane Date: Wed, 27 Feb 2008 17:44:51 +0000 (+0000) Subject: If RelationBuildDesc() fails to open a critical system index, PANIC with X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=32ad08bdc5b95bc44825b1a587c2836a6ba3795e;p=users%2Fbernd%2Fpostgres.git 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. --- diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 9a2f9e900e..5decb3b6de 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -2404,6 +2404,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 = true; \ ird->rd_refcnt = 1; \ } while (0)