From: Tom Lane Date: Wed, 27 Feb 2008 17:45:02 +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=59f237f7302542e5eb5e6683cb78d62ef5279261;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 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)